libvirt/libvirt-virsh-Fix-return-code-for-dump.patch
Xu Yandong dd0ef7b0c8 bugfix: fix virsh dump/migrate and virDaemon return code error
Signed-off-by: Xu Yandong <xuyandong2@huawei.com>
2020-05-12 11:14:39 +08:00

45 lines
1.1 KiB
Diff

From 3e4b15eb78b5815ad4101644efc37bd2bab6608e Mon Sep 17 00:00:00 2001
From: Xu Yandong <xuyandong2@huawei.com>
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@huawei.com>
---
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 afe360c..0a62308 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.23.0