Permalink
Browse files

usb-devices: fix parsing of bcdDevice

The kernel already provide bcdDevice in the right format, there is no
need to reinterpret the value. Doing it leads to the following error
with some devices:

| ...
| T:  Bus=06 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#=  2 Spd=12  MxCh= 0
| D:  Ver= 1.10 Cls=ff(vend.) Sub=ff Prot=ff MxPS= 8 #Cfgs=  1
| /usr/sbin/usb-devices: line 128: printf: 0c: invalid number
| P:  Vendor=08ff ProdID=1600 Rev= 0.10
| ...

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information...
1 parent 20da065 commit 70be91cb18a8508a44f899744647b0cc1aee4f0a @aurel32 aurel32 committed with Aug 7, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 usb-devices
View
@@ -125,7 +125,7 @@ print_device() {
prodid=`cat idProduct`
revmajor=`cat bcdDevice | cut -c 1-2`
revminor=`cat bcdDevice | cut -c 3-4`
- printf "P: Vendor=%s ProdID=%s Rev=%2i.%02i\n" \
+ printf "P: Vendor=%s ProdID=%s Rev=%s.%s\n" \
$vendid $prodid $revmajor $revminor
print_string manufacturer "Manufacturer"

0 comments on commit 70be91c

Please sign in to comment.