1 Star 0 Fork 71

ccxiaop/libvirt

forked from src-openEuler/libvirt 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
virsh-domain-fix-mistake-in-cmdMigrateSetMaxDowntime.patch 1.33 KB
一键复制 编辑 原始数据 按行查看 历史
yezengruan 提交于 2022-12-06 15:38 . libvirt update to version 6.2.0-47
From 59d5adb4620c57743d88dda8e1ac2d20ce7bd9d3 Mon Sep 17 00:00:00 2001
From: wangmeiyang <wangmeiyang_yewu@cmss.chinamobile.com>
Date: Wed, 30 Nov 2022 20:17:09 +0800
Subject: [PATCH 21/24] virsh: domain: fix mistake in
cmdMigrateSetMaxDowntime()
If there was added a new return value indicating success to the
function virDomainMigrateSetMaxDowntime() in the future, because
of the way the function is called it would be treated it as an
error state and would return false (indicating failure). This
patch fixes it, so that the call of the function follows the same
pattern as is currently set in libvirt.
cherry-pick from 0987edbedf96fc920a73213fdad1ad9a119cbee7
Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Signed-off-by: Meiyang Wang <wangmeiyang_yewu@cmss.chinamobile.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
---
tools/virsh-domain.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index c043ad3ce5..6dd56168e3 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -11221,7 +11221,7 @@ cmdMigrateSetMaxDowntime(vshControl *ctl, const vshCmd *cmd)
goto done;
}
- if (virDomainMigrateSetMaxDowntime(dom, downtime, 0))
+ if (virDomainMigrateSetMaxDowntime(dom, downtime, 0) < 0)
goto done;
ret = true;
--
2.27.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ccxiaop/libvirt.git
git@gitee.com:ccxiaop/libvirt.git
ccxiaop
libvirt
libvirt
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385