[PATCH 09/14] qemu: command: Always QEMU_CAPS_VNC_MULTI_SERVERS

Peter Krempa pkrempa at redhat.com
Thu Sep 23 15:37:15 UTC 2021


All supported qemu versions now use the new commandine parser functions,
thus we can remove the old-style commandline generator.

Signed-off-by: Peter Krempa <pkrempa at redhat.com>
---
 src/qemu/qemu_command.c                 | 5 +----
 tests/qemuxml2argvdata/name-escape.args | 2 +-
 tests/qemuxml2argvtest.c                | 2 +-
 3 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 8a3724ad45..b60ee1192b 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -7909,10 +7909,7 @@ qemuBuildGraphicsVNCCommandLine(virQEMUDriverConfig *cfg,

     switch (glisten->type) {
     case VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_SOCKET:
-        if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_VNC_MULTI_SERVERS))
-            virBufferAddLit(&opt, "vnc=unix:");
-        else
-            virBufferAddLit(&opt, "unix:");
+        virBufferAddLit(&opt, "vnc=unix:");
         virQEMUBuildBufferEscapeComma(&opt, glisten->socket);
         break;

diff --git a/tests/qemuxml2argvdata/name-escape.args b/tests/qemuxml2argvdata/name-escape.args
index 449244a082..eaef25b3f1 100644
--- a/tests/qemuxml2argvdata/name-escape.args
+++ b/tests/qemuxml2argvdata/name-escape.args
@@ -36,7 +36,7 @@ QEMU_AUDIO_DRV=spice \
 -device isa-serial,chardev=charserial1,id=serial1 \
 -chardev pipe,id=charchannel0,path=/tmp/guestfwd,,foo \
 -netdev user,guestfwd=tcp:10.0.2.1:4600-chardev:charchannel0,id=channel0 \
--vnc unix:/tmp/lib/domain--1-foo=1,,bar=2/vnc.sock \
+-vnc vnc=unix:/tmp/lib/domain--1-foo=1,,bar=2/vnc.sock \
 -spice unix,addr=/tmp/lib/domain--1-foo=1,,bar=2/spice.sock,gl=on,rendernode=/dev/dri/foo,,bar,seamless-migration=on \
 -device cirrus-vga,id=video0,bus=pci.0,addr=0x2 \
 -drive file.driver=iscsi,file.portal=example.foo.org:3260,file.target=iqn.1992-01.com.example:my,,storage,file.lun=1,file.transport=tcp,if=none,format=raw,id=drive-hostdev0 \
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 9a98c6ca88..cda73d9f88 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -1471,7 +1471,7 @@ mymain(void)
     DO_TEST_CAPS_VER("graphics-vnc-auto-socket", "2.11.0");
     DO_TEST("graphics-vnc-none", QEMU_CAPS_VNC, QEMU_CAPS_DEVICE_CIRRUS_VGA);
     DO_TEST("graphics-vnc-socket-new-cmdline", QEMU_CAPS_VNC,
-            QEMU_CAPS_DEVICE_CIRRUS_VGA, QEMU_CAPS_VNC_MULTI_SERVERS);
+            QEMU_CAPS_DEVICE_CIRRUS_VGA);

     driver.config->vncSASL = 1;
     VIR_FREE(driver.config->vncSASLdir);
-- 
2.31.1




More information about the libvir-list mailing list