Fri Aug 15 11:00:38 IST 2008 Mark McLoughlin <markmc@redhat.com>

* src/qemu_conf.c: fix serial/telnet to use "server" option
        rather than "listen"

        * tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-telnet.args:
        fix the test case too
This commit is contained in:
Mark McLoughlin 2008-08-15 10:02:33 +00:00
parent 6fd4c30285
commit 7c3ccd6f14
2 changed files with 14 additions and 7 deletions

View File

@ -685,12 +685,19 @@ static int qemudBuildCommandLineChrDevStr(virDomainChrDefPtr dev,
break;
case VIR_DOMAIN_CHR_TYPE_TCP:
if (snprintf(buf, buflen, "%s:%s:%s%s",
dev->data.tcp.protocol == VIR_DOMAIN_CHR_TCP_PROTOCOL_TELNET ? "telnet" : "tcp",
dev->data.tcp.host,
dev->data.tcp.service,
dev->data.tcp.listen ? ",listen" : "") >= buflen)
return -1;
if (dev->data.tcp.protocol == VIR_DOMAIN_CHR_TCP_PROTOCOL_TELNET) {
if (snprintf(buf, buflen, "telnet:%s:%s%s",
dev->data.tcp.host,
dev->data.tcp.service,
dev->data.tcp.listen ? ",server" : "") >= buflen)
return -1;
} else {
if (snprintf(buf, buflen, "tcp:%s:%s%s",
dev->data.tcp.host,
dev->data.tcp.service,
dev->data.tcp.listen ? ",listen" : "") >= buflen)
return -1;
}
break;
case VIR_DOMAIN_CHR_TYPE_UNIX:

View File

@ -1 +1 @@
/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial telnet:127.0.0.1:9999,listen -parallel none -usb
/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial telnet:127.0.0.1:9999,server -parallel none -usb