[libvirt] [PATCH v1 02/14] virDomainObjGetOneDefState: Fix error message

Michal Privoznik mprivozn at redhat.com
Thu Oct 19 08:10:57 UTC 2017


It looks like the error message was copied from virsh, because
that's where we have @ctl. Nevertheless, it's @flags which is
invalid, not @ctl.

Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
---
 src/conf/domain_conf.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 31684df54..b3feddc39 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -3418,12 +3418,13 @@ virDomainObjGetOneDefState(virDomainObjPtr vm,
                            unsigned int flags,
                            bool *live)
 {
-    if (flags & VIR_DOMAIN_AFFECT_LIVE && flags & VIR_DOMAIN_AFFECT_CONFIG) {
-            virReportInvalidArg(ctl, "%s",
-                                _("Flags 'VIR_DOMAIN_AFFECT_LIVE' and "
-                                  "'VIR_DOMAIN_AFFECT_CONFIG' are mutually "
-                                  "exclusive"));
-            return NULL;
+    if (flags & VIR_DOMAIN_AFFECT_LIVE &&
+        flags & VIR_DOMAIN_AFFECT_CONFIG) {
+        virReportInvalidArg(flags, "%s",
+                            _("Flags 'VIR_DOMAIN_AFFECT_LIVE' and "
+                              "'VIR_DOMAIN_AFFECT_CONFIG' are mutually "
+                              "exclusive"));
+        return NULL;
     }
 
     if (virDomainObjUpdateModificationImpact(vm, &flags) < 0)
-- 
2.13.6




More information about the libvir-list mailing list