From c93f79290de42ea4acd5801d9600a34e252bdb46 Mon Sep 17 00:00:00 2001 From: Jiri Denemark Date: Wed, 11 Sep 2013 15:49:48 +0200 Subject: [PATCH] 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) --- tools/virsh-domain.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index da6ab8771c..7b500da8d7 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -5003,6 +5003,7 @@ cmdDomjobinfo(vshControl *ctl, const vshCmd *cmd) case VIR_DOMAIN_JOB_NONE: default: vshPrint(ctl, "%-12s\n", _("None")); + ret = true; goto cleanup; }