Package: usbutils
Version: 0.87-5squeeze1
Severity: normal
File: /usr/bin/usb-devices
Tags: patch


The command usb-devices gives an error for one of my devices.

T:  Bus=01 Lev=03 Prnt=05 Port=00 Cnt=01 Dev#= 11 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=ff(vend.) Sub=00 Prot=ff MxPS=64 #Cfgs=  1
P:  Vendor=9710 ProdID=7830 Rev=01.00
S:  Manufacturer=Moschip Semiconductor
S:  Product=UA0025C              
S:  SerialNumber=6e000001
C:  #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=500mA
basename: extra operand `driver'
Try `basename --help' for more information.
I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=ff Driver=

It gives an error on the command basename for displaying the interfaces.
I have also executed the command using:
        bash -x /usr/bin/usb-devices
The relevant part of the error stream is:

+ '[' -L /sys/bus/usb/devices/usb1/1-1/1-1.4/1-1.4.1/1-1.4.1:1.0/driver
']'
++ readlink /sys/bus/usb/devices/usb1/1-1/1-1.4/1-1.4.1/1-1.4.1:1.0/driver
+ driver='../../../../../../../../bus/usb/drivers/MOSCHIP usb-ethernet driver'
++ basename ../../../../../../../../bus/usb/drivers/MOSCHIP usb-ethernet driver
basename: extra operand `driver'
Try `basename --help' for more information.
+ driver=

The problem is that the filename contains spaces and they are passed as
multiple arguments to the basename command. Change the relevant parts of
the bash script from:
                driver=`basename $driver`
to
                driver=`basename "$driver"`
You should always use quotes "" around variables that can contain spaces
or other special characters. Please check all the occurences in the
file.

Regards,
Vincent Smeets

-- System Information:
Debian Release: 6.0.6
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.iso88591, LC_CTYPE=de_DE.iso88591 (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/dash

Versions of packages usbutils depends on:
ii  libc6                   2.11.3-4         Embedded GNU C Library: Shared lib
ii  libusb-0.1-4            2:0.1.12-16      userspace USB programming library
ii  zlib1g                  1:1.2.3.4.dfsg-3 compression library - runtime

usbutils recommends no packages.

Versions of packages usbutils suggests:
ii  wget                          1.12-2.1   retrieves files from the web

-- no debconf information


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to