On Fri, Sep 02, 2011 at 03:18:16AM +0200, Marc-André Lureau wrote: > --- > docs/schemas/domain.rng | 14 +++++ > src/conf/domain_conf.c | 62 +++++++++++++++++++- > src/conf/domain_conf.h | 10 +++ > src/qemu/qemu_command.c | 40 ++++++++++--- > src/qemu/qemu_command.h | 6 +- > src/qemu/qemu_hotplug.c | 2 +- > .../qemuxml2argv-input-usbmouse-addr.args | 1 + > .../qemuxml2argv-input-usbmouse-addr.xml | 27 +++++++++ > tests/qemuxml2argvtest.c | 2 + > 9 files changed, 149 insertions(+), 15 deletions(-) > create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-input-usbmouse-addr.args > create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-input-usbmouse-addr.xml [...] > +++ b/src/qemu/qemu_command.c > @@ -1317,7 +1317,11 @@ qemuBuildDeviceAddressStr(virBufferPtr buf, > info->addr.pci.slot, info->addr.pci.function); > else > virBufferAsprintf(buf, ",addr=0x%x", info->addr.pci.slot); > + } else if (info->type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_USB) { > + virBufferAsprintf(buf, ",bus=usb%d.0", info->addr.usb.bus); Assuming bus 0 we should see "bus=usb0.0" in the output > + virBufferAsprintf(buf, ",port=%d", info->addr.usb.port); > } > + > return 0; [...] > +++ b/tests/qemuxml2argvdata/qemuxml2argv-input-usbmouse-addr.args > @@ -0,0 +1 @@ > +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 -monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -usb -device usb-mouse,id=input0,bus=usb.0,port=4 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 But apparently the test data was using bus=usb.0, so I had to fix it Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@xxxxxxxxxxxx | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/ -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list