]> xenbits.xensource.com Git - libvirt.git/commitdiff
virsh domjobinfo: Do not return 1 if job is NONE
authorJiri Denemark <jdenemar@redhat.com>
Wed, 11 Sep 2013 13:49:48 +0000 (15:49 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Thu, 12 Sep 2013 09:31:49 +0000 (11:31 +0200)
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.

tools/virsh-domain.c

index 74feca17c92adf5ff8b056def8388fef2e4258a6..3479a1c430710b377a160fe32421b4ad6409a913 100644 (file)
@@ -5018,6 +5018,7 @@ cmdDomjobinfo(vshControl *ctl, const vshCmd *cmd)
     case VIR_DOMAIN_JOB_NONE:
     default:
         vshPrint(ctl, "%-12s\n", _("None"));
+        ret = true;
         goto cleanup;
     }