diff options
author | Darsey Litzenberger <dlitz@dlitz.net> | 2018-10-24 06:26:38 -0700 |
---|---|---|
committer | Darsey Litzenberger <dlitz@dlitz.net> | 2018-10-24 07:38:01 -0700 |
commit | b4c4da290d38fde8f4c8779e3e9fe7deae8867cf (patch) | |
tree | 0d70bbfda3c40142f28e3b79d391d43e76841dc3 /lsusb.h | |
parent | 5c5a888e0376654c8aad90bd83e08a8d7c128ac7 (diff) | |
download | usbutils-b4c4da290d38fde8f4c8779e3e9fe7deae8867cf.tar.gz |
lsusb-t: Emit USB IDs and other handy info when verbosity is increased
This is inspired by the behavior of lspci -tv (pciutils).
Example output:
$ ./lsusb -t
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/3p, 480M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/6p, 480M
|__ Port 2: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 6: Dev 4, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 6: Dev 4, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
$ ./lsusb -tv
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/3p, 480M
ID 1d6b:0002 Linux Foundation 2.0 root hub
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/6p, 480M
ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
|__ Port 2: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
ID 046d:c077 Logitech, Inc. M105 Optical Mouse
|__ Port 6: Dev 4, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
ID 0461:0010 Primax Electronics, Ltd HP PR1101U / Primax PMX-KPR1101U Keyboard
|__ Port 6: Dev 4, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
ID 0461:0010 Primax Electronics, Ltd HP PR1101U / Primax PMX-KPR1101U Keyboard
$ ./lsusb -tvv
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/3p, 480M
ID 1d6b:0002 Linux Foundation 2.0 root hub
/sys/bus/usb/devices/usb1 /dev/bus/usb/001/001
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/6p, 480M
ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
/sys/bus/usb/devices/1-1 /dev/bus/usb/001/002
|__ Port 2: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
ID 046d:c077 Logitech, Inc. M105 Optical Mouse
/sys/bus/usb/devices/1-1.2 /dev/bus/usb/001/003
|__ Port 6: Dev 4, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
ID 0461:0010 Primax Electronics, Ltd HP PR1101U / Primax PMX-KPR1101U Keyboard
/sys/bus/usb/devices/1-1.6 /dev/bus/usb/001/004
|__ Port 6: Dev 4, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
ID 0461:0010 Primax Electronics, Ltd HP PR1101U / Primax PMX-KPR1101U Keyboard
/sys/bus/usb/devices/1-1.6 /dev/bus/usb/001/004
Signed-off-by: Darsey Litzenberger <dlitz@dlitz.net>
Diffstat (limited to 'lsusb.h')
-rw-r--r-- | lsusb.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -4,5 +4,6 @@ #define _LSUSB_H extern int lsusb_t(void); +extern unsigned int verblevel; #endif |