[PATCH] virsh: Fix return code for dump

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>From 4899d04fab878d5a0e13f01b8b137af233bc7d33 Mon Sep 17 00:00:00 2001
From: Xu Yandong <xuyandong2@xxxxxxxxxx>
Date: Mon, 4 May 2020 16:36:19 +0800
Subject: [PATCH] virsh: Fix return code for dump

After the commit dc0771c, ret variable no longer
represents the status of the return code, use
data->ret replace it.

Signed-off-by: Xu Yandong <xuyandong2@xxxxxxxxxx>
---
 tools/virsh-domain.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 0704529458..61cd72f714 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -5522,7 +5522,6 @@ static bool
 cmdDump(vshControl *ctl, const vshCmd *cmd)
 {
     virDomainPtr dom;
-    bool ret = false;
     bool verbose = false;
     const char *name = NULL;
     const char *to = NULL;
@@ -5556,12 +5555,12 @@ cmdDump(vshControl *ctl, const vshCmd *cmd)
 
     virThreadJoin(&workerThread);
 
-    if (!ret)
+    if (!data.ret)
         vshPrintExtra(ctl, _("\nDomain %s dumped to %s\n"), name, to);
 
  cleanup:
     virshDomainFree(dom);
-    return !ret;
+    return !data.ret;
 }
 
 static const vshCmdInfo info_screenshot[] = {
-- 
2.21.0






[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux