提交 97975bef 编写于 作者: A Anya Harter 提交者: John Ferlan

qemu: Escape commas for qemuBuildChrChardevFileStr

Add comma escaping for fileval.
Signed-off-by: NAnya Harter <aharter@redhat.com>
Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
上级 452dac71
...@@ -4867,7 +4867,8 @@ qemuBuildChrChardevFileStr(virLogManagerPtr logManager, ...@@ -4867,7 +4867,8 @@ qemuBuildChrChardevFileStr(virLogManagerPtr logManager,
virBufferAsprintf(buf, ",%s=%s,%s=on", filearg, fdpath, appendarg); virBufferAsprintf(buf, ",%s=%s,%s=on", filearg, fdpath, appendarg);
VIR_FREE(fdpath); VIR_FREE(fdpath);
} else { } else {
virBufferAsprintf(buf, ",%s=%s", filearg, fileval); virBufferAsprintf(buf, ",%s=", filearg);
virQEMUBuildBufferEscapeComma(buf, fileval);
if (appendval != VIR_TRISTATE_SWITCH_ABSENT) { if (appendval != VIR_TRISTATE_SWITCH_ABSENT) {
virBufferAsprintf(buf, ",%s=%s", appendarg, virBufferAsprintf(buf, ",%s=%s", appendarg,
virTristateSwitchTypeToString(appendval)); virTristateSwitchTypeToString(appendval));
......
...@@ -25,6 +25,8 @@ bar=2/monitor.sock,server,nowait \ ...@@ -25,6 +25,8 @@ bar=2/monitor.sock,server,nowait \
-usb \ -usb \
-chardev tty,id=charserial0,path=/dev/ttyS2,,foo \ -chardev tty,id=charserial0,path=/dev/ttyS2,,foo \
-device isa-serial,chardev=charserial0,id=serial0 \ -device isa-serial,chardev=charserial0,id=serial0 \
-chardev file,id=charserial1,path=/tmp/serial.log,,foo,append=on \
-device isa-serial,chardev=charserial1,id=serial1 \
-chardev pipe,id=charchannel0,path=/tmp/guestfwd,,foo \ -chardev pipe,id=charchannel0,path=/tmp/guestfwd,,foo \
-netdev user,guestfwd=tcp:10.0.2.1:4600-chardev:charchannel0,id=user-channel0 \ -netdev user,guestfwd=tcp:10.0.2.1:4600-chardev:charchannel0,id=user-channel0 \
-vnc unix:/tmp/lib/domain--1-foo=1,,bar=2/vnc.sock \ -vnc unix:/tmp/lib/domain--1-foo=1,,bar=2/vnc.sock \
......
...@@ -23,6 +23,10 @@ ...@@ -23,6 +23,10 @@
<serial type='dev'> <serial type='dev'>
<source path='/dev/ttyS2,foo'/> <source path='/dev/ttyS2,foo'/>
</serial> </serial>
<serial type='file'>
<source path='/tmp/serial.log,foo' append='on'/>
<target port='0'/>
</serial>
<channel type='pipe'> <channel type='pipe'>
<source path='/tmp/guestfwd,foo'/> <source path='/tmp/guestfwd,foo'/>
<target type='guestfwd' address='10.0.2.1' port='4600'/> <target type='guestfwd' address='10.0.2.1' port='4600'/>
......
...@@ -2763,7 +2763,8 @@ mymain(void) ...@@ -2763,7 +2763,8 @@ mymain(void)
QEMU_CAPS_DEVICE_CIRRUS_VGA, QEMU_CAPS_DEVICE_CIRRUS_VGA,
QEMU_CAPS_SPICE, QEMU_CAPS_SPICE,
QEMU_CAPS_SPICE_UNIX, QEMU_CAPS_SPICE_UNIX,
QEMU_CAPS_DEVICE_ISA_SERIAL); QEMU_CAPS_DEVICE_ISA_SERIAL,
QEMU_CAPS_CHARDEV_FILE_APPEND);
DO_TEST("debug-threads", QEMU_CAPS_NAME_DEBUG_THREADS); DO_TEST("debug-threads", QEMU_CAPS_NAME_DEBUG_THREADS);
DO_TEST("master-key", QEMU_CAPS_OBJECT_SECRET); DO_TEST("master-key", QEMU_CAPS_OBJECT_SECRET);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册