From 67f8ccb4e203ddd899627d81e7ed4cb77d255348 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Tue, 16 Feb 2021 11:29:24 +0000 Subject: [PATCH] qemu: use long on|off syntax for -spice boolean option values MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The preferred syntax for boolean options is to set the value "on" or "off". QEMU 7.1.0 will deprecate the short format we currently use. The long format has been supported with -spice since at least 1.5.3, so we don't need to check for it. Reviewed-by: Ján Tomko Signed-off-by: Daniel P. Berrangé --- src/qemu/qemu_command.c | 8 ++++---- .../qemuxml2argvdata/graphics-spice-agent-file-xfer.args | 2 +- tests/qemuxml2argvdata/graphics-spice-sasl.args | 2 +- tests/qemuxml2argvdata/graphics-spice-usb-redir.args | 2 +- tests/qemuxml2argvdata/graphics-spice.args | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 0fed6e9bde..a8342ff7d5 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -7765,7 +7765,7 @@ qemuBuildGraphicsSPICECommandLine(virQEMUDriverConfigPtr cfg, } if (cfg->spiceSASL) { - virBufferAddLit(&opt, "sasl,"); + virBufferAddLit(&opt, "sasl=on,"); if (cfg->spiceSASLdir) virCommandAddEnvPair(cmd, "SASL_CONF_PATH", @@ -7797,7 +7797,7 @@ qemuBuildGraphicsSPICECommandLine(virQEMUDriverConfigPtr cfg, * in this bit of the code */ if (!graphics->data.spice.auth.passwd && !cfg->spicePassword) - virBufferAddLit(&opt, "disable-ticketing,"); + virBufferAddLit(&opt, "disable-ticketing=on,"); if (hasSecure) { virBufferAddLit(&opt, "x509-dir="); @@ -7879,10 +7879,10 @@ qemuBuildGraphicsSPICECommandLine(virQEMUDriverConfigPtr cfg, virBufferAsprintf(&opt, "streaming-video=%s,", virDomainGraphicsSpiceStreamingModeTypeToString(graphics->data.spice.streaming)); if (graphics->data.spice.copypaste == VIR_TRISTATE_BOOL_NO) - virBufferAddLit(&opt, "disable-copy-paste,"); + virBufferAddLit(&opt, "disable-copy-paste=on,"); if (graphics->data.spice.filetransfer == VIR_TRISTATE_BOOL_NO) - virBufferAddLit(&opt, "disable-agent-file-xfer,"); + virBufferAddLit(&opt, "disable-agent-file-xfer=on,"); if (graphics->data.spice.gl == VIR_TRISTATE_BOOL_YES) { /* spice.gl is a TristateBool, but qemu expects on/off: use diff --git a/tests/qemuxml2argvdata/graphics-spice-agent-file-xfer.args b/tests/qemuxml2argvdata/graphics-spice-agent-file-xfer.args index 5aa7da2d4a..08c3173e6a 100644 --- a/tests/qemuxml2argvdata/graphics-spice-agent-file-xfer.args +++ b/tests/qemuxml2argvdata/graphics-spice-agent-file-xfer.args @@ -27,7 +27,7 @@ server=on,wait=off \ -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 \ -spice port=5903,tls-port=5904,addr=127.0.0.1,x509-dir=/etc/pki/libvirt-spice,\ -tls-channel=main,plaintext-channel=inputs,disable-agent-file-xfer,\ +tls-channel=main,plaintext-channel=inputs,disable-agent-file-xfer=on,\ seamless-migration=on \ -vga qxl \ -global qxl-vga.ram_size=67108864 \ diff --git a/tests/qemuxml2argvdata/graphics-spice-sasl.args b/tests/qemuxml2argvdata/graphics-spice-sasl.args index d71c527a09..024b775afd 100644 --- a/tests/qemuxml2argvdata/graphics-spice-sasl.args +++ b/tests/qemuxml2argvdata/graphics-spice-sasl.args @@ -27,7 +27,7 @@ server=on,wait=off \ -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 \ --spice port=5903,tls-port=5904,addr=127.0.0.1,sasl,\ +-spice port=5903,tls-port=5904,addr=127.0.0.1,sasl=on,\ x509-dir=/etc/pki/libvirt-spice,tls-channel=default,seamless-migration=on \ -vga qxl \ -global qxl-vga.ram_size=67108864 \ diff --git a/tests/qemuxml2argvdata/graphics-spice-usb-redir.args b/tests/qemuxml2argvdata/graphics-spice-usb-redir.args index ba6e6abee7..780e189a95 100644 --- a/tests/qemuxml2argvdata/graphics-spice-usb-redir.args +++ b/tests/qemuxml2argvdata/graphics-spice-usb-redir.args @@ -32,7 +32,7 @@ addr=0x4 \ tls-channel=main,plaintext-channel=inputs,tls-channel=usbredir,\ image-compression=auto_glz,jpeg-wan-compression=auto,\ zlib-glz-wan-compression=auto,playback-compression=on,streaming-video=filter,\ -disable-copy-paste,seamless-migration=on \ +disable-copy-paste=on,seamless-migration=on \ -vga cirrus \ -chardev socket,id=charredir0,host=localhost,port=4000 \ -device usb-redir,chardev=charredir0,id=redir0,bus=usb.0,port=1 \ diff --git a/tests/qemuxml2argvdata/graphics-spice.args b/tests/qemuxml2argvdata/graphics-spice.args index 34f3a7dd33..e2a8593c8e 100644 --- a/tests/qemuxml2argvdata/graphics-spice.args +++ b/tests/qemuxml2argvdata/graphics-spice.args @@ -30,7 +30,7 @@ server=on,wait=off \ tls-channel=default,tls-channel=main,plaintext-channel=inputs,\ image-compression=auto_glz,jpeg-wan-compression=auto,\ zlib-glz-wan-compression=auto,playback-compression=on,streaming-video=filter,\ -disable-copy-paste,disable-agent-file-xfer,seamless-migration=on \ +disable-copy-paste=on,disable-agent-file-xfer=on,seamless-migration=on \ -vga qxl \ -global qxl-vga.ram_size=67108864 \ -global qxl-vga.vram_size=33554432 \