]> 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 11:26:55 +0000 (13:26 +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 5d9489ce21aee924ea665b7b9073fc04caa6030a..9d2f52ec1b448b2887cdd15b560c4b0e31f6f920 100644 (file)
@@ -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;
     }