diff --git a/AUTHORS b/AUTHORS index 3fefd64ad7927da8cc58f50817d8cb1842f11033..752873c0580102afe560fc870c74890e2c012b1a 100644 --- a/AUTHORS +++ b/AUTHORS @@ -234,6 +234,7 @@ Patches have also been contributed by: Jan Kiszka Ryan Woodsmall Radu Caragea + Beat Jörg [....send patches to get your name here....] diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 6f6ef04d8fe1102e7a0cfbadfbee5400cf07a82a..8ac4ee4c06bb93e09788181965cc12215e7bf1b4 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -3293,8 +3293,9 @@ qemuBuildChrChardevStr(virDomainChrSourceDefPtr dev, const char *alias, break; case VIR_DOMAIN_CHR_TYPE_DEV: - virBufferAsprintf(&buf, "tty,id=char%s,path=%s", alias, - dev->data.file.path); + virBufferAsprintf(&buf, "%s,id=char%s,path=%s", + STRPREFIX(alias, "parallel") ? "parport" : "tty", + alias, dev->data.file.path); break; case VIR_DOMAIN_CHR_TYPE_FILE: diff --git a/tests/qemuxml2argvdata/qemuxml2argv-parallel-parport-chardev.args b/tests/qemuxml2argvdata/qemuxml2argv-parallel-parport-chardev.args new file mode 100644 index 0000000000000000000000000000000000000000..48f968aba5e52cadf180d5456e8eb57467e1a9b1 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-parallel-parport-chardev.args @@ -0,0 +1,7 @@ +LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M \ +pc -m 214 -smp 1 -nographic -nodefconfig -nodefaults -chardev socket,\ +id=charmonitor,path=/tmp/test-monitor,server,nowait -mon chardev=charmonitor,\ +id=monitor,mode=readline -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 \ +-chardev parport,id=charparallel0,path=/dev/parport0 -device \ +isa-parallel,chardev=charparallel0,id=parallel0 -usb -device \ +virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-parallel-parport-chardev.xml b/tests/qemuxml2argvdata/qemuxml2argv-parallel-parport-chardev.xml new file mode 100644 index 0000000000000000000000000000000000000000..b495cdc67c0d44a0bcee105ca2f041d6a32ff125 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-parallel-parport-chardev.xml @@ -0,0 +1,29 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219136 + 219136 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu + + + +
+ + + + + + + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 3529c3764070df6248f232451a126d1ac30848dd..a32d4f89a67db3b9d253d172712e528cc89f904b 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -595,6 +595,8 @@ mymain(void) QEMU_CAPS_CHARDEV, QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG); DO_TEST("parallel-tcp-chardev", false, QEMU_CAPS_CHARDEV, QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG); + DO_TEST("parallel-parport-chardev", false, + QEMU_CAPS_CHARDEV, QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG); DO_TEST("console-compat-chardev", false, QEMU_CAPS_CHARDEV, QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG);