0a7476
From ce0f57787141bf49558c42a88bf2c55f27928137 Mon Sep 17 00:00:00 2001
0a7476
Message-Id: <ce0f57787141bf49558c42a88bf2c55f27928137@dist-git>
0a7476
From: Michal Privoznik <mprivozn@redhat.com>
0a7476
Date: Thu, 11 Apr 2019 15:14:17 -0400
0a7476
Subject: [PATCH] qemuL: Drop "user-" prefix for guestfwd netdev
0a7476
0a7476
Introduced by d86c876a66e3.
0a7476
0a7476
There is no real need to have "user-" prefix for chardev.
0a7476
0a7476
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
0a7476
Reviewed-by: John Ferlan <jferlan@redhat.com>
0a7476
(cherry picked from commit 18b8f677456714f04b87525602fa2b62cd4224e1)
0a7476
0a7476
Partially-Resolves: https://bugzilla.redhat.com/1658198
0a7476
Signed-off-by: Laine Stump <laine@redhat.com>
0a7476
Signed-off-by: Laine Stump <laine@laine.org>
0a7476
Message-Id: <20190411191453.24055-6-laine@redhat.com>
0a7476
Acked-by: Michal Privoznik <mprivozn@redhat.com>
0a7476
---
0a7476
 src/qemu/qemu_command.c                                       | 2 +-
0a7476
 tests/qemuxml2argvdata/channel-guestfwd.args                  | 2 +-
0a7476
 .../qemuxml2argvdata/channel-unix-guestfwd.x86_64-2.5.0.args  | 4 ++--
0a7476
 .../qemuxml2argvdata/channel-unix-guestfwd.x86_64-latest.args | 4 ++--
0a7476
 tests/qemuxml2argvdata/name-escape.args                       | 2 +-
0a7476
 5 files changed, 7 insertions(+), 7 deletions(-)
0a7476
0a7476
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
0a7476
index d372b1bd79..52650dc46d 100644
0a7476
--- a/src/qemu/qemu_command.c
0a7476
+++ b/src/qemu/qemu_command.c
0a7476
@@ -10571,7 +10571,7 @@ qemuBuildChannelChrDeviceStr(char **deviceStr,
0a7476
         port = virSocketAddrGetPort(chr->target.addr);
0a7476
 
0a7476
         if (virAsprintf(deviceStr,
0a7476
-                        "user,guestfwd=tcp:%s:%i-chardev:char%s,id=user-%s",
0a7476
+                        "user,guestfwd=tcp:%s:%i-chardev:char%s,id=%s",
0a7476
                         addr, port, chr->info.alias, chr->info.alias) < 0)
0a7476
             goto cleanup;
0a7476
         break;
0a7476
diff --git a/tests/qemuxml2argvdata/channel-guestfwd.args b/tests/qemuxml2argvdata/channel-guestfwd.args
0a7476
index 6a660f7796..b4c857a6d7 100644
0a7476
--- a/tests/qemuxml2argvdata/channel-guestfwd.args
0a7476
+++ b/tests/qemuxml2argvdata/channel-guestfwd.args
0a7476
@@ -25,5 +25,5 @@ server,nowait \
0a7476
 -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
0a7476
 -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \
0a7476
 -chardev pipe,id=charchannel0,path=/tmp/guestfwd \
0a7476
--netdev user,guestfwd=tcp:10.0.2.1:4600-chardev:charchannel0,id=user-channel0 \
0a7476
+-netdev user,guestfwd=tcp:10.0.2.1:4600-chardev:charchannel0,id=channel0 \
0a7476
 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
0a7476
diff --git a/tests/qemuxml2argvdata/channel-unix-guestfwd.x86_64-2.5.0.args b/tests/qemuxml2argvdata/channel-unix-guestfwd.x86_64-2.5.0.args
0a7476
index f0e718e4a2..75b65a237b 100644
0a7476
--- a/tests/qemuxml2argvdata/channel-unix-guestfwd.x86_64-2.5.0.args
0a7476
+++ b/tests/qemuxml2argvdata/channel-unix-guestfwd.x86_64-2.5.0.args
0a7476
@@ -26,8 +26,8 @@ server,nowait \
0a7476
 -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
0a7476
 -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
0a7476
 -chardev socket,id=charchannel0,path=/tmp/guestfwd-listen.socket,server,nowait \
0a7476
--netdev user,guestfwd=tcp:10.0.2.1:4600-chardev:charchannel0,id=user-channel0 \
0a7476
+-netdev user,guestfwd=tcp:10.0.2.1:4600-chardev:charchannel0,id=channel0 \
0a7476
 -chardev socket,id=charchannel1,path=/tmp/guestfwd-connect.socket \
0a7476
--netdev user,guestfwd=tcp:10.0.2.1:4601-chardev:charchannel1,id=user-channel1 \
0a7476
+-netdev user,guestfwd=tcp:10.0.2.1:4601-chardev:charchannel1,id=channel1 \
0a7476
 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \
0a7476
 -msg timestamp=on
0a7476
diff --git a/tests/qemuxml2argvdata/channel-unix-guestfwd.x86_64-latest.args b/tests/qemuxml2argvdata/channel-unix-guestfwd.x86_64-latest.args
0a7476
index f9b9ee5fdb..eaafe66752 100644
0a7476
--- a/tests/qemuxml2argvdata/channel-unix-guestfwd.x86_64-latest.args
0a7476
+++ b/tests/qemuxml2argvdata/channel-unix-guestfwd.x86_64-latest.args
0a7476
@@ -27,9 +27,9 @@ file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
0a7476
 -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
0a7476
 -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
0a7476
 -chardev socket,id=charchannel0,fd=1729,server,nowait \
0a7476
--netdev user,guestfwd=tcp:10.0.2.1:4600-chardev:charchannel0,id=user-channel0 \
0a7476
+-netdev user,guestfwd=tcp:10.0.2.1:4600-chardev:charchannel0,id=channel0 \
0a7476
 -chardev socket,id=charchannel1,path=/tmp/guestfwd-connect.socket \
0a7476
--netdev user,guestfwd=tcp:10.0.2.1:4601-chardev:charchannel1,id=user-channel1 \
0a7476
+-netdev user,guestfwd=tcp:10.0.2.1:4601-chardev:charchannel1,id=channel1 \
0a7476
 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \
0a7476
 -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
0a7476
 resourcecontrol=deny \
0a7476
diff --git a/tests/qemuxml2argvdata/name-escape.args b/tests/qemuxml2argvdata/name-escape.args
0a7476
index 382b8a1a9e..cbf594e808 100644
0a7476
--- a/tests/qemuxml2argvdata/name-escape.args
0a7476
+++ b/tests/qemuxml2argvdata/name-escape.args
0a7476
@@ -37,7 +37,7 @@ cert3=cert3,db=/etc/pki/nssdb,,foo,id=smartcard0,bus=ccid0.0 \
0a7476
 -chardev file,id=charserial1,path=/tmp/serial.log,,foo,append=on \
0a7476
 -device isa-serial,chardev=charserial1,id=serial1 \
0a7476
 -chardev pipe,id=charchannel0,path=/tmp/guestfwd,,foo \
0a7476
--netdev user,guestfwd=tcp:10.0.2.1:4600-chardev:charchannel0,id=user-channel0 \
0a7476
+-netdev user,guestfwd=tcp:10.0.2.1:4600-chardev:charchannel0,id=channel0 \
0a7476
 -vnc unix:/tmp/lib/domain--1-foo=1,,bar=2/vnc.sock \
0a7476
 -spice unix,addr=/tmp/lib/domain--1-foo=1,,bar=2/spice.sock,gl=on,\
0a7476
 rendernode=/dev/dri/foo,,bar \
0a7476
-- 
0a7476
2.21.0
0a7476