[PATCH v3 06/13] qemu: monitor: Don't add 'props' wrapper if qemu has QEMU_CAPS_OBJECT_QAPIFIED

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Set 'objectAddNoWrap' when the capability is present.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 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 31c6f2f66a..0da74d8dff 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"
@@ -672,6 +673,7 @@ qemuMonitorOpenInternal(virDomainObjPtr vm,
                         qemuMonitorCallbacksPtr cb,
                         void *opaque)
 {
+    qemuDomainObjPrivatePtr priv = vm->privateData;
     qemuMonitorPtr mon;
     g_autoptr(GError) gerr = NULL;

@@ -704,6 +706,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.29.2




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux