On 05/06/2013 03:19 PM, Guannan Ren wrote:
---
src/qemu/qemu_command.c | 13 ++++++++
.../qemuxml2argv-graphics-vnc-policy.args | 4 +++
.../qemuxml2argv-graphics-vnc-policy.xml | 35 ++++++++++++++++++++++
tests/qemuxml2argvtest.c | 1 +
4 files changed, 53 insertions(+)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-policy.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-policy.xml
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 144620c..2d051dd 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -5900,6 +5900,19 @@ qemuBuildGraphicsVNCCommandLine(virQEMUDriverConfigPtr cfg,
/* TODO: Support ACLs later */
}
+
+ if (graphics->data.vnc.sharingPolicy) {
+ if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_VNC_DISPLAY_POLICY)) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("vnc display sharing policy are not "
+ "supported with this QEMU"));
s/are not/is not/
+ goto error;
+ }
+
Jan