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>
This commit is contained in:
Ruslan Kabatsayev 2020-11-10 10:15:35 +03:00
parent 993a9817d5
commit 1a19bf5d8e

View File

@ -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_??