summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuslan Kabatsayev <b7.10110111@gmail.com>2020-11-10 10:15:35 +0300
committerRuslan Kabatsayev <b7.10110111@gmail.com>2021-02-22 22:22:31 +0300
commit1a19bf5d8e5fcd2519d1423ef44ba39a407fe4d4 (patch)
tree76686a495c78ff30e794f674786fcc995d36ea4b
parent993a9817d5bec161ceeab77062685de58e54c5f7 (diff)
downloadusbutils-1a19bf5d8e5fcd2519d1423ef44ba39a407fe4d4.tar.gz
Fix formatting of interface descriptors to match /sys/kernel/debug/usb/devices
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>
-rwxr-xr-xusb-devices4
1 files changed, 2 insertions, 2 deletions
diff --git a/usb-devices b/usb-devices
index e2897ff..7daa139 100755
--- a/usb-devices
+++ b/usb-devices
@@ -76,8 +76,8 @@ print_interface() {
driver="(none)"
fi
classname=`class_decode $class`
- printf "I: If#=%2s Alt=%2i #EPs=%2i Cls=%s(%s) Sub=%s Prot=%s Driver=%s\n" \
- 0x${ifnum#0} ${altset#0} ${numeps#0} $class "$classname" $subclass \
+ printf "I: If#=%2i Alt=%2i #EPs=%2i Cls=%s(%s) Sub=%s Prot=%s Driver=%s\n" \
+ 0x${ifnum#0} ${altset#0} 0x${numeps#0} $class "$classname" $subclass \
$protocol $driver
for endpoint in $ifpath/ep_??