qemu: new vnc display sharing policy caps flag

QEMU_CAPS_VNC_SHARE_POLICY (qemu >= 1.1)
This commit is contained in:
Guannan Ren 2013-05-21 22:31:47 +08:00
parent 1c65362f11
commit d377d02dc4
3 changed files with 13 additions and 4 deletions

View File

@ -231,6 +231,8 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
"vnc-websocket", "vnc-websocket",
"drive-discard", "drive-discard",
"mlock", "mlock",
"vnc-share-policy", /* 150 */
); );
struct _virQEMUCaps { struct _virQEMUCaps {
@ -1188,8 +1190,10 @@ virQEMUCapsComputeCmdFlags(const char *help,
if (version >= 11000) if (version >= 11000)
virQEMUCapsSet(qemuCaps, QEMU_CAPS_CPU_HOST); virQEMUCapsSet(qemuCaps, QEMU_CAPS_CPU_HOST);
if (version >= 1001000) if (version >= 1001000) {
virQEMUCapsSet(qemuCaps, QEMU_CAPS_IPV6_MIGRATION); virQEMUCapsSet(qemuCaps, QEMU_CAPS_IPV6_MIGRATION);
virQEMUCapsSet(qemuCaps, QEMU_CAPS_VNC_SHARE_POLICY);
}
if (version >= 1002000) if (version >= 1002000)
virQEMUCapsSet(qemuCaps, QEMU_CAPS_DEVICE_VIDEO_PRIMARY); virQEMUCapsSet(qemuCaps, QEMU_CAPS_DEVICE_VIDEO_PRIMARY);
@ -2433,6 +2437,7 @@ virQEMUCapsInitQMPBasic(virQEMUCapsPtr qemuCaps)
virQEMUCapsSet(qemuCaps, QEMU_CAPS_IPV6_MIGRATION); virQEMUCapsSet(qemuCaps, QEMU_CAPS_IPV6_MIGRATION);
virQEMUCapsSet(qemuCaps, QEMU_CAPS_MACHINE_OPT); virQEMUCapsSet(qemuCaps, QEMU_CAPS_MACHINE_OPT);
virQEMUCapsSet(qemuCaps, QEMU_CAPS_DUMP_GUEST_CORE); virQEMUCapsSet(qemuCaps, QEMU_CAPS_DUMP_GUEST_CORE);
virQEMUCapsSet(qemuCaps, QEMU_CAPS_VNC_SHARE_POLICY);
} }
/* Capabilities that are architecture depending /* Capabilities that are architecture depending

View File

@ -188,6 +188,7 @@ enum virQEMUCapsFlags {
QEMU_CAPS_VNC_WEBSOCKET = 147, /* -vnc x:y,websocket */ QEMU_CAPS_VNC_WEBSOCKET = 147, /* -vnc x:y,websocket */
QEMU_CAPS_DRIVE_DISCARD = 148, /* -drive discard=off(ignore)|on(unmap) */ QEMU_CAPS_DRIVE_DISCARD = 148, /* -drive discard=off(ignore)|on(unmap) */
QEMU_CAPS_MLOCK = 149, /* -realtime mlock=on|off */ 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 */ QEMU_CAPS_LAST, /* this must always be the last item */
}; };

View File

@ -827,7 +827,8 @@ mymain(void)
QEMU_CAPS_IPV6_MIGRATION, QEMU_CAPS_IPV6_MIGRATION,
QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_PCI_BRIDGE,
QEMU_CAPS_DEVICE_SCSI_GENERIC, 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, DO_TEST("qemu-1.2.0", 1002000, 0, 0,
QEMU_CAPS_VNC_COLON, QEMU_CAPS_VNC_COLON,
QEMU_CAPS_NO_REBOOT, QEMU_CAPS_NO_REBOOT,
@ -933,7 +934,8 @@ mymain(void)
QEMU_CAPS_IPV6_MIGRATION, QEMU_CAPS_IPV6_MIGRATION,
QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_PCI_BRIDGE,
QEMU_CAPS_DEVICE_SCSI_GENERIC, 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, DO_TEST("qemu-kvm-1.2.0", 1002000, 1, 0,
QEMU_CAPS_VNC_COLON, QEMU_CAPS_VNC_COLON,
QEMU_CAPS_NO_REBOOT, QEMU_CAPS_NO_REBOOT,
@ -1044,7 +1046,8 @@ mymain(void)
QEMU_CAPS_IPV6_MIGRATION, QEMU_CAPS_IPV6_MIGRATION,
QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_PCI_BRIDGE,
QEMU_CAPS_DEVICE_SCSI_GENERIC, 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; return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
} }