]> xenbits.xensource.com Git - libvirt.git/commitdiff
virsh: Fix return code for dump
authorXu Yandong <xuyandong2@huawei.com>
Mon, 4 May 2020 08:36:19 +0000 (16:36 +0800)
committerAndrea Bolognani <abologna@redhat.com>
Mon, 4 May 2020 12:28:05 +0000 (14:28 +0200)
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@huawei.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
tools/virsh-domain.c

index 0704529458a79a8443832517e82342ec8ed51fcd..61cd72f714760a6f0a79af3642c2665901050b6c 100644 (file)
@@ -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[] = {