Implement path lookup for USB by vendor:product
authorCole Robinson <crobinso@redhat.com>
Mon, 11 Jan 2010 16:40:46 +0000 (11:40 -0500)
committerCole Robinson <crobinso@redhat.com>
Wed, 13 Jan 2010 20:24:41 +0000 (15:24 -0500)
commit5073aa994af460e775cb3e548528e28d7660fcc8
tree0f24c6796f4f2ef3675883e3aa299c388f438891
parent438fa79358995880dc26544c3b4672d8542b77af
Implement path lookup for USB by vendor:product

Based off how QEMU does it, look through /sys/bus/usb/devices/* for
matching vendor:product info, and if found, use info from the surrounding
files to build the device's /dev/bus/usb path.

This fixes USB device assignment by vendor:product when running qemu
as non-root (well, it should, but for some reason I couldn't reproduce
the failure people are seeing in [1], but it appears to work properly)

[1] https://bugzilla.redhat.com/show_bug.cgi?id=542450
po/POTFILES.in
src/qemu/qemu_driver.c
src/security/security_selinux.c
src/security/virt-aa-helper.c
src/util/hostusb.c
src/util/hostusb.h