gregkh / usbutils

USB utilities for Linux, including lsusb
http://www.linux-usb.org
356 stars 202 forks source link

lsusb: Read unkown names from sysfs device desc. #81

Closed JohnAZoidberg closed 5 years ago

JohnAZoidberg commented 5 years ago

lsusb tries to get the names for manufacturer and product of a device by asking the udev hwdb for the names of the device id. Not every manufacturer and device are in this database. Most devices however provide those names in the standard USB descriptors, namely iManufacturer and iProduct. To get those with libusb we would have to open the device which requires superuser privileges. To get those values anyway the kernel provides them in sysfs.

Maybe we want to ask libusb to add the functionality to get those names without having to call libusb_open. I couldn't find that functionality.

gregkh commented 5 years ago

Thanks for the patch, now merged!

JohnAZoidberg commented 5 years ago

Great, thanks for the review and being patient! :)