c313de
From 582d5e7db59ec7897dc0a2a78823860963be9855 Mon Sep 17 00:00:00 2001
c313de
Message-Id: <582d5e7db59ec7897dc0a2a78823860963be9855@dist-git>
c313de
From: Michal Privoznik <mprivozn@redhat.com>
c313de
Date: Thu, 27 Jun 2019 14:44:45 +0200
c313de
Subject: [PATCH] qemu: Drop "user-" prefix for guestfwd netdev
c313de
c313de
Introduced by d86c876a66e3.
c313de
c313de
There is no real need to have "user-" prefix for chardev.
c313de
c313de
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
c313de
Reviewed-by: John Ferlan <jferlan@redhat.com>
c313de
(cherry picked from commit 18b8f677456714f04b87525602fa2b62cd4224e1)
c313de
c313de
https://bugzilla.redhat.com/show_bug.cgi?id=1624204
c313de
c313de
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
c313de
Message-Id: <f9a2801659530438c1253c63a9d754bf46825bfe.1561639408.git.mprivozn@redhat.com>
c313de
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
c313de
---
c313de
 src/qemu/qemu_command.c                      | 2 +-
c313de
 tests/qemuxml2argvdata/channel-guestfwd.args | 2 +-
c313de
 tests/qemuxml2argvdata/name-escape.args      | 2 +-
c313de
 3 files changed, 3 insertions(+), 3 deletions(-)
c313de
c313de
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
c313de
index b5c0588e3c..2b885e98dd 100644
c313de
--- a/src/qemu/qemu_command.c
c313de
+++ b/src/qemu/qemu_command.c
c313de
@@ -10737,7 +10737,7 @@ qemuBuildChannelChrDeviceStr(char **deviceStr,
c313de
         port = virSocketAddrGetPort(chr->target.addr);
c313de
 
c313de
         if (virAsprintf(deviceStr,
c313de
-                        "user,guestfwd=tcp:%s:%i-chardev:char%s,id=user-%s",
c313de
+                        "user,guestfwd=tcp:%s:%i-chardev:char%s,id=%s",
c313de
                         addr, port, chr->info.alias, chr->info.alias) < 0)
c313de
             goto cleanup;
c313de
         break;
c313de
diff --git a/tests/qemuxml2argvdata/channel-guestfwd.args b/tests/qemuxml2argvdata/channel-guestfwd.args
c313de
index 6a660f7796..b4c857a6d7 100644
c313de
--- a/tests/qemuxml2argvdata/channel-guestfwd.args
c313de
+++ b/tests/qemuxml2argvdata/channel-guestfwd.args
c313de
@@ -25,5 +25,5 @@ server,nowait \
c313de
 -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
c313de
 -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \
c313de
 -chardev pipe,id=charchannel0,path=/tmp/guestfwd \
c313de
--netdev user,guestfwd=tcp:10.0.2.1:4600-chardev:charchannel0,id=user-channel0 \
c313de
+-netdev user,guestfwd=tcp:10.0.2.1:4600-chardev:charchannel0,id=channel0 \
c313de
 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
c313de
diff --git a/tests/qemuxml2argvdata/name-escape.args b/tests/qemuxml2argvdata/name-escape.args
c313de
index 382b8a1a9e..cbf594e808 100644
c313de
--- a/tests/qemuxml2argvdata/name-escape.args
c313de
+++ b/tests/qemuxml2argvdata/name-escape.args
c313de
@@ -37,7 +37,7 @@ cert3=cert3,db=/etc/pki/nssdb,,foo,id=smartcard0,bus=ccid0.0 \
c313de
 -chardev file,id=charserial1,path=/tmp/serial.log,,foo,append=on \
c313de
 -device isa-serial,chardev=charserial1,id=serial1 \
c313de
 -chardev pipe,id=charchannel0,path=/tmp/guestfwd,,foo \
c313de
--netdev user,guestfwd=tcp:10.0.2.1:4600-chardev:charchannel0,id=user-channel0 \
c313de
+-netdev user,guestfwd=tcp:10.0.2.1:4600-chardev:charchannel0,id=channel0 \
c313de
 -vnc unix:/tmp/lib/domain--1-foo=1,,bar=2/vnc.sock \
c313de
 -spice unix,addr=/tmp/lib/domain--1-foo=1,,bar=2/spice.sock,gl=on,\
c313de
 rendernode=/dev/dri/foo,,bar \
c313de
-- 
c313de
2.22.0
c313de