]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: use long on|off syntax for -spice boolean option values
authorDaniel P. Berrangé <berrange@redhat.com>
Tue, 16 Feb 2021 11:29:24 +0000 (11:29 +0000)
committerDaniel P. Berrangé <berrange@redhat.com>
Tue, 16 Feb 2021 12:38:30 +0000 (12:38 +0000)
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 <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
src/qemu/qemu_command.c
tests/qemuxml2argvdata/graphics-spice-agent-file-xfer.args
tests/qemuxml2argvdata/graphics-spice-sasl.args
tests/qemuxml2argvdata/graphics-spice-usb-redir.args
tests/qemuxml2argvdata/graphics-spice.args

index 0fed6e9bdedb7bacdb08fe57ed7e6a2c9abddb10..a8342ff7d56e8cd4cc9704d371d779b0f3c4f69f 100644 (file)
@@ -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
index 5aa7da2d4a04fd7cddbe36e10e8e71c19dc6148d..08c3173e6adfa84c739e76751381f65c1dbb1ef6 100644 (file)
@@ -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 \
index d71c527a093d127b861ab456811cb9d60dc36cd7..024b775afd4988b5655fa2835bb89df4ca78c9dc 100644 (file)
@@ -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 \
index ba6e6abee7488c3a3db4b2de2f8f94903dc39c60..780e189a950db407e16cbd8307893897ef0356f8 100644 (file)
@@ -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 \
index 34f3a7dd33b1ab69f896f31ff1a3b0bae55d087b..e2a8593c8e9b7b98d5c2497777a3146f37e60f27 100644 (file)
@@ -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 \