The switch to QemuOpts parser which brought the long-form options
happened in qemu commit 4db14629c3 ("vnc: switch to QemuOpts, allow
multiple servers") released in v2.3.0.
We can always assume this capability and remove the old-style
generators.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_command.c | 10 ++--------
tests/qemuxml2argvdata/graphics-vnc-sasl.args | 2 +-
2 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 08c88b12f4..8a3724ad45 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -7955,10 +7955,7 @@ qemuBuildGraphicsVNCCommandLine(virQEMUDriverConfig *cfg,
}
if (graphics->data.vnc.auth.passwd || cfg->vncPassword) {
- if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_VNC_OPTS))
- virBufferAddLit(&opt, ",password=on");
- else
- virBufferAddLit(&opt, ",password");
+ virBufferAddLit(&opt, ",password=on");
}
if (cfg->vncTLS) {
@@ -7986,10 +7983,7 @@ qemuBuildGraphicsVNCCommandLine(virQEMUDriverConfig *cfg,
}
if (cfg->vncSASL) {
- if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_VNC_OPTS))
- virBufferAddLit(&opt, ",sasl=on");
- else
- virBufferAddLit(&opt, ",sasl");
+ virBufferAddLit(&opt, ",sasl=on");
if (cfg->vncSASLdir)
virCommandAddEnvPair(cmd, "SASL_CONF_PATH", cfg->vncSASLdir);
diff --git a/tests/qemuxml2argvdata/graphics-vnc-sasl.args
b/tests/qemuxml2argvdata/graphics-vnc-sasl.args
index fd1ce48ab5..f5c4b7dfa9 100644
--- a/tests/qemuxml2argvdata/graphics-vnc-sasl.args
+++ b/tests/qemuxml2argvdata/graphics-vnc-sasl.args
@@ -28,6 +28,6 @@ SASL_CONF_PATH=/root/.sasl2 \
-usb \
-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
-device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
--vnc 127.0.0.1:3,sasl \
+-vnc 127.0.0.1:3,sasl=on \
-device cirrus-vga,id=video0,bus=pci.0,addr=0x2 \
-msg timestamp=on
--
2.31.1