1 Star 0 Fork 71

baijing_0022/libvirt

forked from src-openEuler/libvirt 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
virsh-cmdScreenshot-fix-cbdata-passing-to-virshStrea.patch 1.77 KB
一键复制 编辑 原始数据 按行查看 历史
yezengruan 提交于 2022-12-06 15:38 . libvirt update to version 6.2.0-47
From 9fb4749f7ee4bbc75e0ad571a87abd76a0ae1b81 Mon Sep 17 00:00:00 2001
From: tangbinzy <tangbin_yewu@cmss.chinamobile.com>
Date: Tue, 29 Nov 2022 08:15:11 +0000
Subject: [PATCH 01/24] virsh: cmdScreenshot: fix cbdata passing to
virshStreamSink The changes for sparse stream support started passing
virshStreamCallbackDataPtr to virshStreamSink instead of passing a simple
file descriptor, but forgot to adjust all the callers.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Fix it in cmdScreenshot as well.
https://bugzilla.redhat.com/show_bug.cgi?id=1875195
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Fixes: 9e745a97171e10f050962c166082439d6724e245
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Signed-off-by: tangbin <tangbin_yewu@cmss.chinamobile.com>
(cherry-pick from 3144e881b137123b0326157ce6dc23ca649c9270)
---
tools/virsh-domain.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 7033232015..c043ad3ce5 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -5632,6 +5632,7 @@ cmdScreenshot(vshControl *ctl, const vshCmd *cmd)
bool generated = false;
char *mime = NULL;
virshControlPtr priv = ctl->privData;
+ virshStreamCallbackData cbdata;
if (vshCommandOptStringReq(ctl, cmd, "file", (const char **) &file) < 0)
return false;
@@ -5667,7 +5668,10 @@ cmdScreenshot(vshControl *ctl, const vshCmd *cmd)
created = true;
}
- if (virStreamRecvAll(st, virshStreamSink, &fd) < 0) {
+ cbdata.ctl = ctl;
+ cbdata.fd = fd;
+
+ if (virStreamRecvAll(st, virshStreamSink, &cbdata) < 0) {
vshError(ctl, _("could not receive data from domain %s"), name);
goto cleanup;
}
--
2.27.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/baijing_0022/libvirt.git
git@gitee.com:baijing_0022/libvirt.git
baijing_0022
libvirt
libvirt
master

搜索帮助