From 93ef9cf21d0a5c5c428ed01b9041aa55d0b89328 Mon Sep 17 00:00:00 2001 From: Michal Privoznik Date: Wed, 18 Oct 2017 19:40:29 +0200 Subject: [PATCH] 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 --- 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 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) -- GitLab