« Previous | Next » 

Revision 55496240

ID554962405cb18a3e624edf05b6257eaf9273810c

Added by Mark McLoughlin almost 15 years ago

Prefer sysfs for USB host devices

Scanning for devices via /sys/bus/usb/devices/ and using them via the
/dev/bus/usb/<bus>/<device> character devices is the prefered method
on modern kernels, so try that first.

When using SELinux and libvirt, qemu will have access to /sys/bus/usb
but not /proc/bus/usb, so although the current code will work just
fine, it will generate SELinux AVC warnings.

See also:

https://bugzilla.redhat.com/508326

Reported-by: Daniel Berrange <>
Signed-off-by: Mark McLoughlin <>
Signed-off-by: Anthony Liguori <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences