Blob Blame History Raw
From 8cb402b248c072f5a9e440e33fae60bd77d06a69 Mon Sep 17 00:00:00 2001
Message-Id: <8cb402b248c072f5a9e440e33fae60bd77d06a69.1379193140.git.jdenemar@redhat.com>
From: Jiri Denemark <jdenemar@redhat.com>
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 f35a3c5..bf5f425 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -4995,6 +4995,7 @@ cmdDomjobinfo(vshControl *ctl, const vshCmd *cmd)
     case VIR_DOMAIN_JOB_NONE:
     default:
         vshPrint(ctl, "%-12s\n", _("None"));
+        ret = true;
         goto cleanup;
     }
 
-- 
1.8.3.2