Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Based on some review from Lonnie Abelbeck, if get_sysfs_name() failed in
get_vendor_product_with_fallback(), the strings "[unknown]" would not be
properly set for the product/vendor.
Now the odds of that happening are very slim, but simplify this all by
setting the strings first, and then, if we can find a real override, use
that instead.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Previously the -v output would not show the vendor/product names if they
were not in the hwdb. Change that to look in sysfs as well if the
database does not have a string, as that's what the non-v version does.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
The parameter 'dev' is not used, so remove it.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Honor system libdir and includedir
|
|
In commit 8a80f70a8afb ("names.c: if a string can not be found in the
usb.ids file, return [unknown]"), the logic for determining the vendor
and product for the USB device was changed to ONLY rely on the usb.ids
file, instead of falling back to any vendor/product strings that are on
the device itself.
This had the bad side-affect of causing many devices that previously
showed vendor/product information just fine, to now show up as
[unknown].
Fix this up to fall back to looking at the string in the device itself,
and ONLY if the string is not present, will '[unknown]' be printed out.
This changes the output on one of my machines from:
Bus 003 Device 002: ID 32ac:0002 [unknown] [unknown]
to:
Bus 003 Device 002: ID 32ac:0002 Framework HDMI Expansion Card
This should resolve github issue #177, many thanks to the people
reporting it quickly there.
Fixes: 8a80f70a8afb ("names.c: if a string can not be found in the usb.ids file, return [unknown]")
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Both libdir and includedir are defined by autoconf, use these dirs instead of hardcoded dirs.
Signed-off-by: rezso <rezso@rezso.net>
|
|
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
For the output of 'lsusb -t' if a driver is not bound to an interface,
the result looks odd. Fix that up by printing out "[none]" instead.
This changes the output of a line that previous looked like:
|__ Port 004: Dev 006, If 0, Class=[unknown], Driver=, 12M
to be:
|__ Port 004: Dev 006, If 0, Class=[unknown], Driver=[none], 12M
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
For interfaces or other USB strings, if they are not in the current
hardware database, return "[unknown]" to give people a chance to
understand why their device isn't reporting anything for those fields.
This changes the output of a line that previous looked like:
|__ Port 004: Dev 006, If 0, Class=, Driver=, 12M
to be:
|__ Port 004: Dev 006, If 0, Class=[unknown], Driver=, 12M
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Most distros put usb.ids in /usr/share/hwdata/ now, so add that as a
default search path to make working with the script directly out of the
source directory easier. This does not change the ability for the build
system to add their own default path, so distros should not have any
functional change at all.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Some interfaces/devices can not do wakeup at all, and the script will
crash if it runs into them. Handle this properly by reporting
"unsupported" if the file can not be read from sysfs, as that is what
this means.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Not all USB devices have interfaces. This is true in particular of
the STMicroelectronics STEVAL-USBC2DP Type-C to DisplayPort adapter,
as well as possibly other USB-C devices.
As a result these devices do not show up in the output from "lsusb -t",
because the logic in print_tree_dev_interface() lists interfaces, not
devices (as implied by the function's name). This means that the
output from "lsusb -t" can be inconsistent with the output from
"lsusb", since some devices are omitted.
To fix the problem, we make the subroutine call print_usbdevice() at
least once even if the device has no interfaces, and make the latter
routine print a minimal description of such devices (anything that does
not require access to the interface descriptor).
Reported-and-tested-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Link: https://lore.kernel.org/linux-usb/70c563f1-847c-32a1-cf4d-6bf9802017ab@interlog.com/
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Add a section saying where the source is located.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
In translations, people noticed the missing '-' for options in the text,
so fix that up to look correct.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
It was pointed out that assign_interface_to_parent() was looking at the
wrong string for the string check, so fix that up.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
lsusb shows values in 3 digit fields, so do the same for 'lsusb -t' as
well, making it more obvious what device matches up with what.
This also mirrors the output of the -vv option as well, which shows that
the kernel uses 3 digits for these values in /dev/bus/usb/
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
I can't remember why this was in reverse order, but now that 'lsusb'
outputs the busses in sorted order, do the same thing here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
lsusb: Add function that sorts the output by device ID.
|
|
Use bigger buffer to place speed value string
|
|
Display (device) power/wakeup via -w option.
|
|
e.g.
> ./lsusb.py.in -w
usb1 1d6b:0002 09 1IF [USB 2.00, 480 Mbps, 0mA, power wakeup: disabled]
(xhci-hcd 0000:c4:00.3) hub
1-2 2109:2822 09 1IF [USB 2.10, 480 Mbps, 0mA, power wakeup: disabled]
(VIA Labs, Inc. USB2.0 Hub 000000001) hub
1-2.1 046d:c52f 00 2IFs [USB 2.00,12 Mbps, 98mA, power wakeup: enabled]
(Logitech USB Receiver)
Signed-off-by: Bob Hyman <bob.hyman@gmail.com>
|
|
Also add more possible speed value strings in the comments.
Signed-off-by: Dingyan Li <18500469033@163.com>
|
|
Generate usbutils.pc pkgconfig file
|
|
Allow buildsystems using pkgconfig to find usb-utils.
I think some library I was using was trying to find usb.ids using pkgconfig.
Signed-off-by: Hannes Weisbach <hannesweisbach@gmail.com>
|
|
Previous change to make `lsusb -h` not return an error forgot to account
that the help is also printed when an invalid option is used.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
lsusb: fix incorrect variable type and unalignments when dumping hid …
|
|
usb-devices: make shellcheck happy
|
|
Fix a typo in usb-spec.h
|
|
Fix up the issue where 'lsusb -h' will return an error to the shell, it
succeeded, so return 0 instead.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Rigth => Right
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
|
|
This change should not make any difference in behavior,
but fixes all shellcheck warnings besides https://www.shellcheck.net/wiki/SC3043
Also replacing 'var=`cat file`' with 'read' makes usb-devices much faster.
Old:
real 0m0,849s
user 0m0,388s
sys 0m0,531s
New:
real 0m0,245s
user 0m0,109s
sys 0m0,155s
Signed-off-by: Lukas Nykryn <lnykryn@redhat.com>
|
|
Extra spaces should be added when printing below lines:
'Report Descriptors:
** UNAVAILABLE **'
Signed-off-by: Dingyan Li <18500469033@163.com>
|
|
While dumping descriptors of a USB hid device, I saw a weird line:
'Report Descriptor: (length is -1)'
This is because variable 'n' is used to hold a potential negative
integer value even though it's an unsigned int type in function
dump_hid_device. When usb_control_msg() fails, overflow happens.
It will always pass the 'if' statement below and call dump_report_desc(),
where this weird line finally shows up.
To fix it, an int type should be used to avoid overflow.
Signed-off-by: Dingyan Li <18500469033@163.com>
|
|
usbreset: Allow idProduct and idVendor to be 0
|
|
idProduct at least, is valid as 0, and I guess idVendor can
typically be left at 0 while developing some new usb thing.
Signed-off-by: Kristoffer Ellersgaard Koch <kristoffer.koch@gmail.com>
|
|
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
lsusb-t: Fix recursive sorting on child devices.
|
|
lsusb: Improve status display for SuperSpeedPlus hubs
|
|
implemented within this pull request. The output remains the same as the one demonstrated in the previous commit.
Signed-off-by: Tan Li Boon <liboon.tan@mujin.co.jp>
|
|
In the previous commit, the output is as thus:
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 004 Device 002: ID 17ef:a391 Lenovo USB3.1 Hub
Bus 004 Device 003: ID 17ef:a393 Lenovo USB3.1 Hub
Bus 004 Device 004: ID 17ef:a387 Lenovo USB-C Dock Ethernet
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 002: ID 0bda:0328 Realtek Semiconductor Corp. USB3.0-CRW
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 001 Device 006: ID 5986:2115 Acer, Inc Integrated Camera
Bus 001 Device 008: ID 06cb:009a Synaptics, Inc. Metallica MIS Touch Fingerprint Reader
Bus 001 Device 025: ID 17ef:a392 Lenovo USB2.0 Hub
Bus 001 Device 026: ID 17ef:a394 Lenovo USB2.0 Hub
Bus 001 Device 027: ID 2be8:0002 ARCHISS PTR87 ARCHISS PTR87
Bus 001 Device 028: ID 17ef:a395 Lenovo USB2.0 Hub
Bus 001 Device 029: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port / Mobile Action MA-8910P
Bus 001 Device 030: ID 04b4:521a Cypress Semiconductor Corp. USB-I2C Bridge
Bus 001 Device 031: ID 17ef:a396 Lenovo ThinkPad USB-C Dock Gen2 USB Audio
With the changes introduced by this commit, the output becomes:
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 045e:0823 Microsoft Corp. Classic IntelliMouse
Bus 001 Device 003: ID 17ef:a392 Lenovo USB2.0 Hub
Bus 001 Device 005: ID 5986:2115 Acer, Inc Integrated Camera
Bus 001 Device 006: ID 17ef:a394 Lenovo USB2.0 Hub
Bus 001 Device 007: ID 06cb:009a Synaptics, Inc. Metallica MIS Touch Fingerprint Reader
Bus 001 Device 008: ID 17ef:a395 Lenovo USB2.0 Hub
Bus 001 Device 009: ID 04b4:521a Cypress Semiconductor Corp. USB-I2C Bridge
Bus 001 Device 010: ID 17ef:a396 Lenovo ThinkPad USB-C Dock Gen2 USB Audio
Bus 001 Device 011: ID 2be8:0002 ARCHISS PTR87 ARCHISS PTR87
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 002: ID 0bda:0328 Realtek Semiconductor Corp. USB3.0-CRW
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 004 Device 002: ID 17ef:a391 Lenovo USB3.1 Hub
Bus 004 Device 003: ID 17ef:a393 Lenovo USB3.1 Hub
Bus 004 Device 004: ID 17ef:a387 Lenovo USB-C Dock Ethernet
Signed-off-by: Tan Li Boon <liboon.tan@mujin.co.jp>
|
|
The DescriptorSubtype should be checking for 0x02, not 0x01, in order to
display (GENERAL) or (Invalid) as per the USB specification for USB MIDI
devices.
Reported-by: symdeb
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Fix an runtime error reported by undefind sanitizer
|
|
Fix the following error when compiling with undefined sanitizer:
./lsusb
names.c:36:29: runtime error: left shift of 16 by 27 places cannot be represented in type 'int'
Signed-off-by: Han Han <hhan@redhat.com>
|
|
On the master branch, device IDs are unsorted. An example from my laptop:
Bus 004 Device 003: ID 17ef:a393 Lenovo USB3.1 Hub
Bus 004 Device 004: ID 17ef:a387 Lenovo USB-C Dock Ethernet
Bus 004 Device 002: ID 17ef:a391 Lenovo USB3.1 Hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 0bda:0328 Realtek Semiconductor Corp. USB3.0-CRW
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 008: ID 06cb:009a Synaptics, Inc. Metallica MIS Touch Fingerprint Reader
Bus 001 Device 006: ID 5986:2115 Acer, Inc Integrated Camera
Bus 001 Device 029: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port / Mobile Action MA-8910P
Bus 001 Device 032: ID 045e:0823 Microsoft Corp. Classic IntelliMouse
Bus 001 Device 031: ID 17ef:a396 Lenovo ThinkPad USB-C Dock Gen2 USB Audio
Bus 001 Device 030: ID 04b4:521a Cypress Semiconductor Corp. USB-I2C Bridge
Bus 001 Device 028: ID 17ef:a395 Lenovo USB2.0 Hub
Bus 001 Device 027: ID 2be8:0002 ARCHISS PTR87 ARCHISS PTR87
Bus 001 Device 026: ID 17ef:a394 Lenovo USB2.0 Hub
Bus 001 Device 025: ID 17ef:a392 Lenovo USB2.0 Hub
Bus 001 Device 002: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
This patch introduces a function that sorts the device IDs by bus:
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 004 Device 002: ID 17ef:a391 Lenovo USB3.1 Hub
Bus 004 Device 003: ID 17ef:a393 Lenovo USB3.1 Hub
Bus 004 Device 004: ID 17ef:a387 Lenovo USB-C Dock Ethernet
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 002: ID 0bda:0328 Realtek Semiconductor Corp. USB3.0-CRW
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 001 Device 006: ID 5986:2115 Acer, Inc Integrated Camera
Bus 001 Device 008: ID 06cb:009a Synaptics, Inc. Metallica MIS Touch Fingerprint Reader
Bus 001 Device 025: ID 17ef:a392 Lenovo USB2.0 Hub
Bus 001 Device 026: ID 17ef:a394 Lenovo USB2.0 Hub
Bus 001 Device 027: ID 2be8:0002 ARCHISS PTR87 ARCHISS PTR87
Bus 001 Device 028: ID 17ef:a395 Lenovo USB2.0 Hub
Bus 001 Device 029: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port / Mobile Action MA-8910P
Bus 001 Device 030: ID 04b4:521a Cypress Semiconductor Corp. USB-I2C Bridge
Bus 001 Device 031: ID 17ef:a396 Lenovo ThinkPad USB-C Dock Gen2 USB Audio
Signed-off-by: Tan Li Boon <liboon.tan@mujin.co.jp>
|
|
Before this change, child devices beyond the first level of children underneath Bus IDs are not sorted.
An example can be seen on a laptop with a USB-C dock attached to it. On current master, the output of lsusb -t looks like this:
/: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 10000M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 10000M
|__ Port 1: Dev 4, If 0, Class=Vendor Specific Class, Driver=r8152, 5000M
|__ Port 3: Dev 3, If 0, Class=Hub, Driver=hub/4p, 10000M
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 480M
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 5000M
|__ Port 3: Dev 2, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/12p, 480M
|__ Port 1: Dev 2, If 1, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 1: Dev 2, If 2, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 1: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 3: Dev 25, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 3: Dev 26, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 4: Dev 29, If 0, Class=Vendor Specific Class, Driver=pl2303, 12M
|__ Port 2: Dev 27, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 2: Dev 27, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 3: Dev 28, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 4: Dev 32, If 1, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 4: Dev 32, If 0, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 2: Dev 31, If 2, Class=Audio, Driver=snd-usb-audio, 12M
|__ Port 2: Dev 31, If 0, Class=Audio, Driver=snd-usb-audio, 12M
|__ Port 2: Dev 31, If 3, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 2: Dev 31, If 1, Class=Audio, Driver=snd-usb-audio, 12M
|__ Port 1: Dev 30, If 0, Class=Vendor Specific Class, Driver=, 12M
|__ Port 1: Dev 30, If 1, Class=Vendor Specific Class, Driver=, 12M
|__ Port 8: Dev 6, If 1, Class=Video, Driver=uvcvideo, 480M
|__ Port 8: Dev 6, If 0, Class=Video, Driver=uvcvideo, 480M
|__ Port 9: Dev 8, If 0, Class=Vendor Specific Class, Driver=, 12M
The devices or ports of the children from second level onwards are unsorted on in reverse order.
After my change, the output becomes
/: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 10000M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 10000M
|__ Port 1: Dev 4, If 0, Class=Vendor Specific Class, Driver=r8152, 5000M
|__ Port 3: Dev 3, If 0, Class=Hub, Driver=hub/4p, 10000M
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 480M
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 5000M
|__ Port 3: Dev 2, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/12p, 480M
|__ Port 1: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 1: Dev 2, If 1, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 1: Dev 2, If 2, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 3: Dev 25, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 3: Dev 26, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 2: Dev 27, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 2: Dev 27, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 3: Dev 28, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 1: Dev 30, If 0, Class=Vendor Specific Class, Driver=, 12M
|__ Port 1: Dev 30, If 1, Class=Vendor Specific Class, Driver=, 12M
|__ Port 2: Dev 31, If 0, Class=Audio, Driver=snd-usb-audio, 12M
|__ Port 2: Dev 31, If 1, Class=Audio, Driver=snd-usb-audio, 12M
|__ Port 2: Dev 31, If 2, Class=Audio, Driver=snd-usb-audio, 12M
|__ Port 2: Dev 31, If 3, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 4: Dev 32, If 0, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 4: Dev 32, If 1, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 4: Dev 29, If 0, Class=Vendor Specific Class, Driver=pl2303, 12M
|__ Port 8: Dev 6, If 0, Class=Video, Driver=uvcvideo, 480M
|__ Port 8: Dev 6, If 1, Class=Video, Driver=uvcvideo, 480M
|__ Port 9: Dev 8, If 0, Class=Vendor Specific Class, Driver=, 12M
Where all devices are now correctly sorted in ascending order.
Signed-off-by: Tan Li Boon <liboon.tan@mujin.co.jp>
|
|
Add more status information for SuperSpeedPlus hubs by using the
EXT_PORT_STATUS request to determine the actual link speed ID and number
of lanes that the hub reports it is connected with. This is needed to be
able to figure out the actual connection speed for SuperSpeedPlus
devices.
This requires parsing the BOS prior to the hub information, since we can
only use EXT_PORT_STATUS if the device actually has a SuperSpeedPlus
device capability.
Also fix some issues with the SuperSpeedPlus device capability parsing -
the speed attribute and speed ID counts were off by one, and the minimum
functional speed information is now parsed out.
Signed-off-by: Robert Hancock <hancockrwd@gmail.com>
|
|
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Again, wireless USB is long dead, this code would never get triggered at
all, so just remove it as it is not being used.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Wireless USB is long dead, and this check never actually worked, so
remove it.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
When recursing into a long USB tree, the local variables in the
print_device() function would get confused and take on the value of the
previous device it printed. This caused devices to not get printed out
at all, the exact opposite of what we wanted.
Resolve this by using the non-POSIX 'local' variable declaration.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Previously "usb10" would come before "usb2"
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
lsusb: don't complain on EAGAIN
|
|
Given the requested decriptors are optional, seems like lsusb
should NOT use perror() to communicate why it can't get
the descriptors in question (output is directed to stderr, not stdout).
Further, if we were told to "come back later" (EGAIN),
then it's really not an error.
Only emit this output when user adds "-vv" to the command line.
Signed-off-by: Grant Grundler <grundler@chromium.org>
|
|
CTRL_RETRIES was never used. Remove it.
Signed-off-by: Grant Grundler <grundler@chromium.org>
|
|
Fix typos in lsusb.8.in
|
|
Signed-off-by: Matthias Braun <m.braun@htl-leonding.ac.at>
|
|
desc-defs.c: fix possible out-of-bound read
|
|
lsusb.c: fix leak in dump_printer_device
|
|
lsusb: Fix typo in string output for iAdditionalInfoURL
|
|
usb-devices: do not use `local` in a POSIX shell script
|
|
Found by static analysis:
Expression (UAC_FORMAT_TYPE_I << 12) + ARRAY_LEN(audio_data_format_type_i)
evaluates to 6 which is the length of the audio_data_format_type_i array.
Therefore, if value is set to 6, the condition evaluates to true and
ouf-of-bound read could occur.
Signed-off-by: Lukas Zaoral <lzaoral@redhat.com>
|
|
Fixes:
$ ksh /bin/usb-devices
/bin/usb-devices[92]: local: not found [No such file or directory]
Signed-off-by: Lukas Zaoral <lzaoral@redhat.com>
|
|
Allocation made by get_dev_string was not freed.
Signed-off-by: Lukas Zaoral <lzaoral@redhat.com>
|
|
Fixes #126
Signed-off-by: Benson Leung <bleung@chromium.org>
|
|
lsusb-t: Add lower bound checks in read_sysfs_file_string
|
|
lsusb: Fix buffer size copy/paste error
|
|
When I added these calls, I mistakenly passed them all the size of the
vendor buffer instead of the buffers they actually fill. As it happens,
all the sizes are the same, so there's no correctness issue, but we
should still fix the issue for code clarity and ease of modification.
Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
|
|
I have a USB device that returns "\n\n" in manufacturer field which
makes newline cleanup in read_sysfs_file_string result in out-of-bound
access.
Fix this by adding lower bound checks in the loops.
Signed-off-by: Bui Quang Minh <minhquangbui99@gmail.com>
|
|
Some fixes for printing endpoints and interfaces by usb-devices
|
|
/sys/kernel/debug/usb/devices
Max packet size is printed as a single number in
/sys/kernel/debug/usb/devices, rather than a product of the form X*Y.
This patch makes the output of usb-devices match
/sys/kernel/debug/usb/devices.
Signed-off-by: Ruslan Kabatsayev <b7.10110111@gmail.com>
|
|
Endpoint type is given as "Control" or "Interrupt" in
/sys/bus/usb/devices/..../type, while in /sys/kernel/debug/usb/devices
it's instead "Ctrl" or "Int.", respectively. This patch adds conversion
so that the relevant output of usb-devices matches
/sys/kernel/debug/usb/devices.
Signed-off-by: Ruslan Kabatsayev <b7.10110111@gmail.com>
|
|
Direction of an endpoint is formatted as "I", "O" or "B" in
/sys/kernel/debug/usb/devices, while in
/sys/bus/usb/devices/..../direction it's instead "in", "out" or "both". This
patch adds the conversion to make the relevant output of usb-devices
look like /sys/kernel/debug/usb/devices.
Signed-off-by: Ruslan Kabatsayev <b7.10110111@gmail.com>
|
|
Interface and number of endpoints are formatted as decimals in
/sys/kernel/debug/usb/devices, while their formatting in dedicated files
under /sys/bus/usb/devices/ is in hexadecimal without 0x prefix. This
patch ensures the correct conversion for both.
Signed-off-by: Ruslan Kabatsayev <b7.10110111@gmail.com>
|
|
lsusb-t.c: fix tree mode for dual-lane modes of USB 3.2
|
|
Signed-off-by: Adrian Kalazi <adrian@kalazi.com>
|
|
This is required at least on my Linux 4.14.157 system, as well as Ubuntu
20.04 with Linux 5.4.0-42-generic.
Signed-off-by: Ruslan Kabatsayev <b7.10110111@gmail.com>
|
|
lsusb: Improvements to UVC Interface Descriptor decoding
|
|
lsusb(8): mention the udev's hardware database
|
|
usbutils is now REUSE 3.0 spec compliant!
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Ugh, the fact that this license is treated "unique" like this by SPDX is
crazy...
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
There were a few files in usbhid-dump that were missing this.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Taken from the git log
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
{sigh} tools...
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
This makes `reuse lint` happy as well as license lawyers...
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
This lets us parse things easier and points to where these files came
from.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
reuse wants to see license files that match the SPDX tag, but for the
"fun" that the FSF seems to have inflicted on the "or-later" moniker for
the GPL licenses, having a duplicated copy of the file is pointless.
So just add a symlink to point to the same thing and all is good as far
as `reuse lint` cares.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
These functions were split out of name.c/h but the copyright lines did
not follow. Fix that up.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
The bEndpointAddress field in UVC VideoStreaming Interface Descriptors
follows the same format as in Endpoint Descriptors. This patch changes
dump_videostreaming_interface to display the endpoint addresses in the
same way.
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
|
|
According to the USB Device Class Definition, Revision 1.5, it is
spelled bEndpointAddress.
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
|
|
Despite the switch to the udev's hardware database being a few years
old, users are still confused when they update usb.ids on their system
and see no effects. This patch therefore updates the lsusb(8) manpage to
mention it.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
|
|
Makefile.am: Remove unused DATADIR
|
|
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Probably missing from commit 5d7ea40b
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
|
|
Some devices have a bunch of whitespace in the string for no good
reason. Strip that off to make things look better.
The diff of an output from before/after for a device I have looks like:
- 3-2 2109:2812 09 1IF [USB 2.10, 480 Mbps, 0mA] (VIA Labs, Inc. USB2.0 Hub ) hub
+ 3-2 2109:2812 09 1IF [USB 2.10, 480 Mbps, 0mA] (VIA Labs, Inc. USB2.0 Hub) hub
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Devices that are not a hub end up with a trailing space on the line,
which is not nice. Prevent that from happening.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Fix bug in sysfs path construction and expand usage of sysfs queries
|
|
|
|
lsusb.py: remove private paths for usb.ids
|
|
Cliff Biffle points out that some devices lie about the length of their
string, so we end up with stack data in the string buffer, which is then
displayed by userspace. Fix this up by initializing the data to 0 first
before reading from the device.
Reported-by: Cliff L. Biffle <code@cliffle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
bootstrap: change /bin/bash to /bin/sh
|
|
usbhid-dump: Put back autoconf check for libusb_set_option()
|
|
lsusb(8): document --tree
|
|
lsusb(8): fix formatting
|
|
Additional device classes for usb-devices script
|
|
It fell out in commit e0525b6
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
|
|
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
|
|
Commas separating options should not be in bold;
punctuation following variable name should not be in italics.
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
|
|
When running with -v, we previously populated these strings only if we
were able to open the device and query the string descriptors directly.
However, these three values are also reported by the kernel as
world-readable files in sysfs. By querying those instead (using the same
function that already existed for querying fallback vendor and product
names), we can populate these values even for unprivileged users.
These sysfs properties have existed since at least 2005, so I think it's
quite unlikely that this change will regress existing users. However, if
it turns out to, we can always add back the old logic as a fallback when
sysfs isn't available.
Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
|
|
commit dddb696e0172 ("lsusb: Read unkown names from sysfs device desc.")
introduced a fallback option for vendor and product names in device
summary lines, fetching them from sysfs when the VID/PID are not present
in udev hwdb. However, it applied this new logic only to summary lines
listing multiple devices (i.e. not -D mode, which only lists a single
device). Refactor the logic into a common function and use it in both
places.
Fixes: dddb696e0172 ("lsusb: Read unkown names from sysfs device desc.")
Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
|
|
commit dddb696e0172 ("lsusb: Read unkown names from sysfs device desc.")
added code to query a device's self-reported vendor and product names
from sysfs in the case where no names were present in the udev hwdb.
However, as far as I can tell that code was and still is totally broken
for any device that isn't directly under a root hub: this is because it
uses the libusb_get_port_number() function, which only returns the leaf
port number, but treats the returned number as if it's a full device
path.
For example, when trying to query sysfs for the device 2-8.3 (a device
on Port 3 of a hub that's on Port 8 of Bus 2), it will instead
erroneously query device 2-3, ignoring the first hub altogether. This
results in nonsensical output from lsusb, such as a device identified as
a "Bose Corp. Steam Controller".
To fix the issue, use the libusb_get_port_numbers() function to get a
full list of port numbers from the root and use that to construct the
proper dotted devpath. Additionally, special case root devices, which
have the sysfs name "usbN", where "N" is the bus number. Thanks to Tian
Yunhao, who submitted a different fix for this same issue, for spotting
that last piece.
Fixes: dddb696e0172 ("lsusb: Read unkown names from sysfs device desc.")
Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
|
|
This function was added to names.c by commit dddb696e0172 ("lsusb: Read
unkown names from sysfs device desc."), but it doesn't really belong
there: sysfs is an entirely different data source from the udev hwdb
that names.c works with, and this function both does things (like
directly accessing files) that other functions in names.c don't and
doesn't do things (like depending on the work done by names_init()) that
those other functions do.
Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
|
|
Several newer USB Device classes are not presently reported individually by
usb-devices, (They are reported as "unk. ").
This patch adds the following classes: 10h (USB Type-C combined Audio/Video
devices) 11h (USB billboard), 12h (USB Type-C Bridge).
As defined at [https://www.usb.org/defined-class-codes]
Signed-off-by: Rob Gill <rrobgill@protonmail.com>
|
|
Signed-off-by: Timothy Robert Bednarzyk <trbednarzyk@protonmail.com>
|
|
Do not look for usb.ids in the private paths of other software, as
those locations are not public interface.
Signed-off-by: Pino Toscano <toscano.pino@tiscali.it>
|
|
usbhid-dump: Do not use rindex
|
|
lsusb: fix two typos in UVC Extension Unit descriptor
|
|
Fix two minor typos in UVC Extension Unit descriptor to make all the field
names match the UVC 1.1 spec, page 58, Table 3-10.
Signed-off-by: Torleiv Sundre <torleiv@huddly.com>
|
|
lsusb.8.in: do not mention usb.ids
|
|
rindex was removed in POSIX 2008. It is optionally unavailable with
uClibc-ng.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
|
|
The lsusb binary does not use the usb.ids file anymore, instead it uses
the udev hardware database. Mentionning usb.ids in lsusb(8) is therefore
very confusing for the users. This patch therefore drops that part.
|
|
Since commit 508d1acf42e ("usb-devices: use /bin/sh hashbang")
usb-devices does not require bash.
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
As pointed out ValZapod, the name variable is not used at all, so just
delete it.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
uhd_dev_list_len() and uhd_dev_list_empty() were never used, so delete
them.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
This removes some unused autoconf stuff (like the libtool checking) and
cleans up the need for some subdirectories for build tools.
Also unified the configure.ac file a bit to match the main usbutils
file, with the goal of eventually only having one run of autoconf
needed, hopefully soon.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
'make distclean' fails as I forgot to add this file to the clean list.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
No need for a two-level-deep include directory for some local include
files. Just put them next to the .c files and all is good.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
There is no need for a "library" here at all, just build all of the .c
files into the one binary, saving a link step and making the tree a bit
smaller.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
libusb_strerror() has been around for a long time, we can rely on it
being in the library if we use it. So remove our local copy of the
function. This deletes 2 files and cleans up some autoconf logic as
well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
This cleans up the headers of all of the usbhid-dump files by putting
proper SPDX identifiers on them, and removing all of the license
boiler-plate code that is not needed.
No license or copyright has been changed at all.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
This puts the proper manpage header on usbhid-dump.8 to show where it
came from.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
This saves us some extra subdirectories that are not needed.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
This "merges" the usbhid-dump upstream repository (found at
git@github.com:DIGImend/usbhid-dump.git) into the usbutils directory.
We are doing this to make the management of the two simpler to handle
overall, and hopefully reduce the size of the usbhid-dump source tree a
bit.
Note, this was done by "rewriting" the history of the usbhid-dump
repository by moving it into the usbhid-dump subdirectory. All of the
commits are still here, just under a new sha1 because of the rewrite.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Needed so that we can merge the "real" usbhid-dump tree into here.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Refresh the spdx file and add my authorship information to the file
itself.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Signed-off-by: Mantas Mikulėnas <grawity@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Signed-off-by: Mantas Mikulėnas <grawity@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Signed-off-by: Mantas Mikulėnas <grawity@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Signed-off-by: Mantas Mikulėnas <grawity@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Signed-off-by: Mantas Mikulėnas <grawity@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Signed-off-by: Mantas Mikulėnas <grawity@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
This simplifies debugging.
Signed-off-by: Mantas Mikulėnas <grawity@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Signed-off-by: Mantas Mikulėnas <grawity@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Signed-off-by: Mantas Mikulėnas <grawity@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
- Place all globals above functions.
- Do not need chr(), this is not Visual Basic.
- Use .startswith() instead of hardcoding the length.
Signed-off-by: Mantas Mikulėnas <grawity@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
The class knows how to format itself, so it should know how to indent
itself, like the other two classes do.
Signed-off-by: Mantas Mikulėnas <grawity@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Signed-off-by: Mantas Mikulėnas <grawity@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Signed-off-by: Mantas Mikulėnas <grawity@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Signed-off-by: Mantas Mikulėnas <grawity@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Signed-off-by: Mantas Mikulėnas <grawity@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Signed-off-by: Mantas Mikulėnas <grawity@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Signed-off-by: Mantas Mikulėnas <grawity@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Signed-off-by: Mantas Mikulėnas <grawity@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Their main purpose in life was to be sortable, which we no longer do.
Signed-off-by: Mantas Mikulėnas <grawity@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Signed-off-by: Mantas Mikulėnas <grawity@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
This is more suitable for a method that returns human-oriented strings.
Signed-off-by: Mantas Mikulėnas <grawity@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Signed-off-by: Mantas Mikulėnas <grawity@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Signed-off-by: Mantas Mikulėnas <grawity@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
There is no significant gain in reinventing the wheel here.
Signed-off-by: Mantas Mikulėnas <grawity@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Signed-off-by: Mantas Mikulėnas <grawity@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Even sys.stdout.write(str(usbdev)) would have been better.
Signed-off-by: Mantas Mikulėnas <grawity@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Signed-off-by: Mantas Mikulėnas <grawity@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Signed-off-by: Mantas Mikulėnas <grawity@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Signed-off-by: Mantas Mikulėnas <grawity@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
It doesn't actually do a deep copy, and Python already has ways of doing
a shallow copy (list(foo) and [*foo] for arbitrary iterables; foo[:] for
indexable lists).
Signed-off-by: Mantas Mikulėnas <grawity@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Signed-off-by: Mantas Mikulėnas <grawity@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Signed-off-by: Mantas Mikulėnas <grawity@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Signed-off-by: Mantas Mikulėnas <grawity@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Revert "Require newer version of libusb"
|
|
This partially reverts commit 3fe9f89 of usbutils and
updates the usbhid-dump submodule to 209c2b0, which works
around possibly missing libusb_set_option() in older
versions of libusb and thus does not require libusb 1.0.22.
However, lsusb.c itself relies on libusb_get_port_number()
since dddb696 which was added in libusb 1.0.12. Furthermore
the enum values declaring the various debug levels have
changed to their current state in libusb 1.0.13. This version
temporarily fixed a typo in struct libusb_config_descriptor
which was reverted in 1.0.14 again.
So to sum up the previous version check for 1.0.9 in usbutils
previous to 3fe9f89 was wrong and we should test against 1.0.14
instead.
This change was tested against libusb 1.0.14 built from source.
Signed-off-by: Stefan Tauner <stefan.tauner@gmx.at>
|
|
man pages: add information on verbosity levels of -t option
|
|
Signed-off-by: Valerii Zapodovnikov <val.zapod.vz@gmail.com>
|
|
Resolves #4
|
|
|
|
|
|
Some more compat and convenience for lsusb.py
|
|
Require newer version of libusb
|
|
... was very simple to achieve: Import print_function from future and
fallback in open(errors=ignore) function.
Signed-off-by: Kurt Garloff <kurt@garloff.de>
|
|
For usbhid devices, find and display hidraw and driver names.
Signed-off-by: Kurt Garloff <kurt@garloff.de>
|
|
This makes the parser more readable.
Also add one special case to work around a syntax error "01xy" in
some versions of usb.ids.
Avoid variable name "dir" in find_dev().
Signed-off-by: Kurt Garloff <kurt@garloff.de>
|
|
We can look at several well-known places for usb.ids. The @usbids@
mechanism from configure remains at the first position and option -f
overrides the searching.
Signed-off-by: Kurt Garloff <kurt@garloff.de>
|
|
The change to update usbhid-dump in commit 89a279c implicitly changed
the required version of libusb from 1.0.9 to a version that contains
libusb_set_options(). The function was introduced in libusb 1.0.22, so
let's update the pkg-config check to match.
Fixes: #83
|
|
Use the C standard uint*_t variable types, not the "unix" types of
u_int*_t as we should be able to all finally agree on one type of C
variables.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
lsusb: Read unkown names from sysfs device desc.
|
|
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.
Signed-off-by: Daniel Schaefer <git@danielschaefer.me>
|
|
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Add usbreset.c as noinst_PROGRAMS target.
|
|
lsusb-t: Emit USB IDs and other handy info when verbosity is increased
|
|
Add support for Billboard Alt Mode descriptor (and a formatting fix)
|
|
|