1 Star 0 Fork 71

wangyangdahai/libvirt

forked from src-openEuler/libvirt 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
qemu-monitor-Don-t-add-props-wrapper-if-qemu-has-QEM.patch 1.49 KB
一键复制 编辑 原始数据 按行查看 历史
yezengruan 提交于 2022-03-24 14:54 . update patch with openeuler !58
From 25f25258f0574822834c459eb414eba217b23f23 Mon Sep 17 00:00:00 2001
From: Peter Krempa <pkrempa@redhat.com>
Date: Mon, 30 Nov 2020 18:30:46 +0100
Subject: [PATCH 13/16] qemu: monitor: Don't add 'props' wrapper if qemu has
QEMU_CAPS_OBJECT_QAPIFIED
Set 'objectAddNoWrap' when the capability is present.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
---
src/qemu/qemu_monitor.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
index dd1bf925b2..ec79fa6368 100644
--- a/src/qemu/qemu_monitor.c
+++ b/src/qemu/qemu_monitor.c
@@ -32,6 +32,7 @@
#include "qemu_monitor_json.h"
#include "qemu_domain.h"
#include "qemu_process.h"
+#include "qemu_capabilities.h"
#include "virerror.h"
#include "viralloc.h"
#include "virlog.h"
@@ -666,6 +667,7 @@ qemuMonitorOpenInternal(virDomainObjPtr vm,
qemuMonitorCallbacksPtr cb,
void *opaque)
{
+ qemuDomainObjPrivatePtr priv = vm->privateData;
qemuMonitorPtr mon;
g_autoptr(GError) gerr = NULL;
@@ -698,6 +700,9 @@ qemuMonitorOpenInternal(virDomainObjPtr vm,
mon->cb = cb;
mon->callbackOpaque = opaque;
+ if (priv)
+ mon->objectAddNoWrap = virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_OBJECT_QAPIFIED);
+
if (virSetCloseExec(mon->fd) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
"%s", _("Unable to set monitor close-on-exec flag"));
--
2.27.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wangyangdahai/libvirt.git
git@gitee.com:wangyangdahai/libvirt.git
wangyangdahai
libvirt
libvirt
master

搜索帮助