[PATCH 1/3 v4] qemu: new vnc display sharing policy caps flag

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

 



QEMU_CAPS_VNC_SHARE_POLICY (qemu >= 1.1)
---
 src/qemu/qemu_capabilities.c | 7 ++++++-
 src/qemu/qemu_capabilities.h | 1 +
 tests/qemuhelptest.c         | 9 ++++++---
 3 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 82129a2..b13a5ab 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -231,6 +231,8 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
               "vnc-websocket",
               "drive-discard",
               "mlock",
+
+              "vnc-share-policy", /* 150 */
     );
 
 struct _virQEMUCaps {
@@ -1188,8 +1190,10 @@ virQEMUCapsComputeCmdFlags(const char *help,
     if (version >= 11000)
         virQEMUCapsSet(qemuCaps, QEMU_CAPS_CPU_HOST);
 
-    if (version >= 1001000)
+    if (version >= 1001000) {
         virQEMUCapsSet(qemuCaps, QEMU_CAPS_IPV6_MIGRATION);
+        virQEMUCapsSet(qemuCaps, QEMU_CAPS_VNC_SHARE_POLICY);
+    }
 
     if (version >= 1002000)
         virQEMUCapsSet(qemuCaps, QEMU_CAPS_DEVICE_VIDEO_PRIMARY);
@@ -2433,6 +2437,7 @@ virQEMUCapsInitQMPBasic(virQEMUCapsPtr qemuCaps)
     virQEMUCapsSet(qemuCaps, QEMU_CAPS_IPV6_MIGRATION);
     virQEMUCapsSet(qemuCaps, QEMU_CAPS_MACHINE_OPT);
     virQEMUCapsSet(qemuCaps, QEMU_CAPS_DUMP_GUEST_CORE);
+    virQEMUCapsSet(qemuCaps, QEMU_CAPS_VNC_SHARE_POLICY);
 }
 
 /* Capabilities that are architecture depending
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index 117bf8a..90d08c6 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -188,6 +188,7 @@ enum virQEMUCapsFlags {
     QEMU_CAPS_VNC_WEBSOCKET      = 147, /* -vnc x:y,websocket */
     QEMU_CAPS_DRIVE_DISCARD      = 148, /* -drive discard=off(ignore)|on(unmap) */
     QEMU_CAPS_MLOCK              = 149, /* -realtime mlock=on|off */
+    QEMU_CAPS_VNC_SHARE_POLICY   = 150, /* set display sharing policy */
 
     QEMU_CAPS_LAST,                   /* this must always be the last item */
 };
diff --git a/tests/qemuhelptest.c b/tests/qemuhelptest.c
index f7f88d0..f6bf7dd 100644
--- a/tests/qemuhelptest.c
+++ b/tests/qemuhelptest.c
@@ -827,7 +827,8 @@ mymain(void)
             QEMU_CAPS_IPV6_MIGRATION,
             QEMU_CAPS_DEVICE_PCI_BRIDGE,
             QEMU_CAPS_DEVICE_SCSI_GENERIC,
-            QEMU_CAPS_DEVICE_SCSI_GENERIC_BOOTINDEX);
+            QEMU_CAPS_DEVICE_SCSI_GENERIC_BOOTINDEX,
+            QEMU_CAPS_VNC_SHARE_POLICY);
     DO_TEST("qemu-1.2.0", 1002000, 0, 0,
             QEMU_CAPS_VNC_COLON,
             QEMU_CAPS_NO_REBOOT,
@@ -933,7 +934,8 @@ mymain(void)
             QEMU_CAPS_IPV6_MIGRATION,
             QEMU_CAPS_DEVICE_PCI_BRIDGE,
             QEMU_CAPS_DEVICE_SCSI_GENERIC,
-            QEMU_CAPS_DEVICE_SCSI_GENERIC_BOOTINDEX);
+            QEMU_CAPS_DEVICE_SCSI_GENERIC_BOOTINDEX,
+            QEMU_CAPS_VNC_SHARE_POLICY);
     DO_TEST("qemu-kvm-1.2.0", 1002000, 1, 0,
             QEMU_CAPS_VNC_COLON,
             QEMU_CAPS_NO_REBOOT,
@@ -1044,7 +1046,8 @@ mymain(void)
             QEMU_CAPS_IPV6_MIGRATION,
             QEMU_CAPS_DEVICE_PCI_BRIDGE,
             QEMU_CAPS_DEVICE_SCSI_GENERIC,
-            QEMU_CAPS_DEVICE_SCSI_GENERIC_BOOTINDEX);
+            QEMU_CAPS_DEVICE_SCSI_GENERIC_BOOTINDEX,
+            QEMU_CAPS_VNC_SHARE_POLICY);
 
     return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }
-- 
1.8.1.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[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]