From: Michal Privoznik Date: Wed, 18 Oct 2017 17:40:29 +0000 (+0200) Subject: virDomainObjGetOneDefState: Fix error message X-Git-Tag: v3.9.0-rc1~71 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=93ef9cf21d0a5c5c428ed01b9041aa55d0b89328;p=thirdparty%2Flibvirt.git virDomainObjGetOneDefState: Fix error message 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 --- diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index b85d3f5a6e..7151b8c004 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -3417,12 +3417,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)