From: Jiri Denemark Date: Wed, 11 Sep 2013 13:49:48 +0000 (+0200) Subject: virsh domjobinfo: Do not return 1 if job is NONE X-Git-Tag: v1.0.5.7~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=168f70cfe99d3c276ec60e70d4f30f4f377f1502;p=thirdparty%2Flibvirt.git virsh domjobinfo: Do not return 1 if job is NONE https://bugzilla.redhat.com/show_bug.cgi?id=1006864 Commit 38ab1225 changed the default value of ret from true to false but forgot to set ret = true when job is NONE. Thus, virsh domjobinfo returned 1 when there was no job running for a domain but it used to (and should) return 0 in this case. (cherry picked from commit f084caae7c5db8ae03e7fafce164c73f65681843) --- diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 5d9489ce21..9d2f52ec1b 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -4854,6 +4854,7 @@ cmdDomjobinfo(vshControl *ctl, const vshCmd *cmd) case VIR_DOMAIN_JOB_NONE: default: vshPrint(ctl, "%-12s\n", _("None")); + ret = true; goto cleanup; }