]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Fix -chardev udp if parameters are omitted
authorCole Robinson <crobinso@redhat.com>
Thu, 11 Aug 2011 07:19:51 +0000 (15:19 +0800)
committerDaniel Veillard <veillard@redhat.com>
Thu, 11 Aug 2011 07:19:51 +0000 (15:19 +0800)
commitd30d5726507fd59a87127eb22075cfcb4482f9df
treeb54e9c400cd6dc9080210d4a3e4a36e94eaea8b7
parente6d5d6105c082e5009c5aceb7db8acd32250517d
qemu: Fix -chardev udp if parameters are omitted

The following XML:

    <serial type='udp'>
      <source mode='connect' service='9999'/>
    </serial>

is accepted by domain_conf.c but maps to the qemu command line:

-chardev udp,host=127.0.0.1,port=2222,localaddr=(null),localport=(null)

qemu can cope with everything omitting except the connection port, which
seems to also be the intent of domain_conf validation, so let's not
generate bogus command lines for that case.
The defaults are empty strings for addresses and 0 for the localport

Additionally, tweak the qemu cli parsing to handle omitted host
parameters
for -serial udp
src/qemu/qemu_command.c
tests/qemuxml2argvdata/qemuxml2argv-serial-udp-chardev.args
tests/qemuxml2argvdata/qemuxml2argv-serial-udp-chardev.xml
tests/qemuxml2argvdata/qemuxml2argv-serial-udp.args
tests/qemuxml2argvdata/qemuxml2argv-serial-udp.xml