]> git.ipfire.org Git - thirdparty/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)
committerJán Tomko <jtomko@redhat.com>
Tue, 15 Oct 2013 14:03:08 +0000 (16:03 +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.
(cherry picked from commit f084caae7c5db8ae03e7fafce164c73f65681843)

tools/virsh-domain.c

index 5257416543ae3c9b1f75f3f9d53ba0b190031a30..69e4b2eb233c86e964ee747f989aaf89e220256f 100644 (file)
@@ -4931,6 +4931,7 @@ cmdDomjobinfo(vshControl *ctl, const vshCmd *cmd)
     case VIR_DOMAIN_JOB_NONE:
     default:
         vshPrint(ctl, "%-12s\n", _("None"));
+        ret = true;
         goto cleanup;
     }