diff options
author | Ruslan Kabatsayev <b7.10110111@gmail.com> | 2020-11-10 10:22:38 +0300 |
---|---|---|
committer | Ruslan Kabatsayev <b7.10110111@gmail.com> | 2021-02-23 14:45:39 +0300 |
commit | d131266685cc74679a3388709e1406ceb66015a4 (patch) | |
tree | 9b1a765705c8f0a568ca1eae7c9afa6f31ebad82 | |
parent | 9a8fef9f31d723be3bd96f30a0388948dcc51003 (diff) | |
download | usbutils-d131266685cc74679a3388709e1406ceb66015a4.tar.gz |
Fix formatting of max endpoint packet size to match /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>
-rwxr-xr-x | usb-devices | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usb-devices b/usb-devices index 740bfe0..9240664 100755 --- a/usb-devices +++ b/usb-devices @@ -64,11 +64,11 @@ print_endpoint() { fi maxps_hex="0x`cat $eppath/wMaxPacketSize`" # Extract MaxPS size (bits 0-10) and multiplicity values (bits 11-12) - maxps=`printf "%4i*%s\n" $(($maxps_hex & 0x7ff)) \ - $((1 + (($maxps_hex >> 11) & 0x3)))` + maxps=$((`printf "%4i*%s\n" $(($maxps_hex & 0x7ff)) \ + $((1 + (($maxps_hex >> 11) & 0x3)))`)) interval=`cat $eppath/interval` - printf "E: Ad=%s(%s) Atr=%s(%s) MxPS=%s Ivl=%s\n" \ + printf "E: Ad=%s(%s) Atr=%s(%s) MxPS=%4s Ivl=%s\n" \ $addr $dir $attr $eptype "$maxps" $interval } |