]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Allow omitting USB port
authorJán Tomko <jtomko@redhat.com>
Fri, 1 Jul 2016 12:20:44 +0000 (14:20 +0200)
committerJán Tomko <jtomko@redhat.com>
Mon, 18 Jul 2016 08:55:35 +0000 (10:55 +0200)
commit4f903643186d0a59c4590fc8a6e8d9493c4d3d6b
tree7f276b124a2b5bd4ea324a294da7494382ebd540
parent08d566a0cf7ed052b6ab3c9bd93f04156999d80b
Allow omitting USB port

We were requiring a USB port path in the schema, but not enforcing it.
Omitting the USB port would lead to libvirt formatting it as (null).
Such domain cannot be started and will disappear after libvirtd restart
(since it cannot parse back the XML).

Only format the port if it has been specified and mark it as optional
in the XML schema.
docs/schemas/domaincommon.rng
src/conf/domain_conf.c
src/qemu/qemu_command.c
tests/qemuxml2argvdata/qemuxml2argv-usb-port-missing.args [new file with mode: 0644]
tests/qemuxml2argvdata/qemuxml2argv-usb-port-missing.xml [new file with mode: 0644]
tests/qemuxml2argvtest.c
tests/qemuxml2xmloutdata/qemuxml2xmlout-usb-port-missing.xml [new file with mode: 0644]
tests/qemuxml2xmltest.c