]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: call usb search function for hostdev initialization and hotplug
authorGuannan Ren <gren@redhat.com>
Sun, 6 May 2012 14:45:05 +0000 (22:45 +0800)
committerGuannan Ren <gren@redhat.com>
Mon, 7 May 2012 15:36:25 +0000 (23:36 +0800)
commit05abd1507d66aabb6cad12eeafeb4c4d1911c585
treeb9f81a0fa23d662fbd15059a3072e3179051b638
parent9914477efc9764f691ca50faca6592a2d4fecec8
qemu: call usb search function for hostdev initialization and hotplug

src/qemu/qemu_hostdev.c:
refactor qemuPrepareHostdevUSBDevices function, make it focus on
adding usb device to activeUsbHostdevs after check. After that,
the usb hotplug function qemuDomainAttachHostDevice also could use
it.
expand qemuPrepareHostUSBDevices to perform the usb search,
rollback on failure.

src/qemu/qemu_hotplug.c:
If there are multiple usb devices available with same vendorID and productID,
but with different value of "bus, device", we give an error to let user
use <address> to specify the desired one.
src/qemu/qemu_hostdev.c
src/qemu/qemu_hostdev.h
src/qemu/qemu_hotplug.c