mirror of https://gitee.com/openkylin/libvirt.git
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:
parent
6fd4c30285
commit
7c3ccd6f14
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue