Skip to contentSkip to conversation

usbutils 0.82 release

DISCUSSION Greg KH 2 participants 8 messages May 6, 2009 – May 9, 2009

lore
Share & tools
lore

Greg KH

author
#0 lore raw

Here's the 0.82 release of usbutils.

Many bugs with autoconf were resolved to hopefully make it easier for distros to find where the usb.ids file is dynamically. Wireless USB device support was added, as well as other bugfixes. The full shortlog is below.

The tarballs can be downloaded from sf.net at:
https://sourceforge.net/project/showfiles.php?group_id=3581

We've switched over to using git for development now, which makes things much easier than the old cvs tree. The tree can be found on both kernel.org and github.com if you want to fork it and send us changes easier:
http://git.kernel.org/?p=linux/kernel/git/gregkh/usbutils.git
http://github.com/gregkh/usbutils/tree/master

thanks,

greg k-h

-----------

Shortlog of changes since last release (0.81):

Aurelien Jarno (3):
lsusb: fix parsing of /proc/bus/usb/devices lsusb(8): also suggests usbview(8) lsusb(8): explain that -t option overrides -v

Greg Kroah-Hartman (1):
fix merge error that I missed.

Kay Sievers (5):
configure: default to /usr
substitute usb.id location in man page and update script use DISTCLEANFILES and 'g' for 'sed'
add usbutils.pc file to point to database file add usbutils.pc to .gitignore

Mike Frysinger (3):
configure: use AC_MSG_RESULT() rather than echo fix handling of usb.ids.gz in the Makefile.am add update-usbids.sh to EXTRA_DIST

王神 (1):
lsusb: add WUSB definitions and descriptor dumping

#1 lore raw
Quoted 10 lines · Greg KH

Here's the 0.82 release of usbutils.

Many bugs with autoconf were resolved to hopefully make it easier for distros to find where the usb.ids file is dynamically.  Wireless USB device support was added, as well as other bugfixes.  The full shortlog is below.

The tarballs can be downloaded from sf.net at:
       https://sourceforge.net/project/showfiles.php?group_id=3581

Not sure if this is a real problem or not. There is a compiler warning for gcc 4.4.0.

gcc -DHAVE_CONFIG_H -I. -DDATADIR=\"/usr/share\" -g -O2 -MT
lsusb-names.o -MD -MP -MF .deps/lsusb-names.Tpo -c -o lsusb-names.o test -f 'names.c' || echo './'names.c
names.c: In function ‘names_init’:
names.c:803: warning: assignment makes pointer from integer without a cast

Signature · 1 line
Xiaofan http://mcuee.blogspot.com
author
#2 lore raw
Quoted 12 lines · Xiaofan Chen
Quoted 10 lines · Greg KH

Here's the 0.82 release of usbutils.

Many bugs with autoconf were resolved to hopefully make it easier for distros to find where the usb.ids file is dynamically.  Wireless USB device support was added, as well as other bugfixes.  The full shortlog is below.

The tarballs can be downloaded from sf.net at:
       https://sourceforge.net/project/showfiles.php?group_id=3581

Quoted 8 lines

Not sure if this is a real problem or not. There is a compiler warning for gcc 4.4.0.

gcc -DHAVE_CONFIG_H -I. -DDATADIR=\"/usr/share\" -g -O2 -MT
lsusb-names.o -MD -MP -MF .deps/lsusb-names.Tpo -c -o lsusb-names.o test -f 'names.c' || echo './'names.c
names.c: In function ‘names_init’:
names.c:803: warning: assignment makes pointer from integer without a cast

Care to provide a patch for this?

thanks,

greg k-h

#3 lore raw
Quoted 11 lines · Greg KH
Quoted 8 lines · Xiaofan Chen

Not sure if this is a real problem or not. There is a compiler warning for gcc 4.4.0.

gcc -DHAVE_CONFIG_H -I.   -DDATADIR=\"/usr/share\"   -g -O2 -MT lsusb-names.o -MD -MP -MF .deps/lsusb-names.Tpo -c -o lsusb-names.o test -f 'names.c' || echo './'names.c
names.c: In function ‘names_init’:
names.c:803: warning: assignment makes pointer from integer without a cast

Care to provide a patch for this?

To be honest, I do not know the reason of the warning. It looks fine to me but I am not a real programmer.

In fact, I tried version 0.73 and there is no warning there and the file name.c is the same between 0.73 and 0.81/0.82.

For 0.73:
[mcuee@myhost usbutils-0.73]$ make
make all-am
make[1]: Entering directory `/home/mcuee/Desktop/build/usbutils/usbutils-0.73' if gcc -DHAVE_CONFIG_H -I. -I. -I. -DUSBIDS_DIR='"/usr/local/share"' -Wall -W -Wunused -g -O2 -MT lsusb.o -MD -MP -MF ".deps/lsusb.Tpo" -c -o lsusb.o lsusb.c; \
then mv -f ".deps/lsusb.Tpo" ".deps/lsusb.Po"; else rm -f
".deps/lsusb.Tpo"; exit 1; fi
lsusb.c: In function ‘do_wireless’:
lsusb.c:2648: warning: unused parameter ‘fd’
if gcc -DHAVE_CONFIG_H -I. -I. -I. -DUSBIDS_DIR='"/usr/local/share"' -Wall -W -Wunused -g -O2 -MT names.o -MD -MP -MF ".deps/names.Tpo" -c -o names.o names.c; \
then mv -f ".deps/names.Tpo" ".deps/names.Po"; else rm -f
".deps/names.Tpo"; exit 1; fi
if gcc -DHAVE_CONFIG_H -I. -I. -I. -DUSBIDS_DIR='"/usr/local/share"' -Wall -W -Wunused -g -O2 -MT devtree.o -MD -MP -MF ".deps/devtree.Tpo" -c -o devtree.o devtree.c; \
then mv -f ".deps/devtree.Tpo" ".deps/devtree.Po"; else rm -f
".deps/devtree.Tpo"; exit 1; fi
if gcc -DHAVE_CONFIG_H -I. -I. -I. -DUSBIDS_DIR='"/usr/local/share"' -Wall -W -Wunused -g -O2 -MT usbmisc.o -MD -MP -MF ".deps/usbmisc.Tpo" -c -o usbmisc.o usbmisc.c; \
then mv -f ".deps/usbmisc.Tpo" ".deps/usbmisc.Po"; else rm -f
".deps/usbmisc.Tpo"; exit 1; fi
gcc -Wall -W -Wunused -g -O2 -o lsusb lsusb.o names.o devtree.o
usbmisc.o -lz -lusb
make[1]: Leaving directory `/home/mcuee/Desktop/build/usbutils/usbutils-0.73'

Signature · 1 line
Xiaofan http://mcuee.blogspot.com
#4 lore raw
Quoted 11 lines · Xiaofan Chen
Quoted 10 lines · Greg KH
Quoted 8 lines · Xiaofan Chen

Not sure if this is a real problem or not. There is a compiler warning for gcc 4.4.0.

gcc -DHAVE_CONFIG_H -I.   -DDATADIR=\"/usr/share\"   -g -O2 -MT lsusb-names.o -MD -MP -MF .deps/lsusb-names.Tpo -c -o lsusb-names.o test -f 'names.c' || echo './'names.c
names.c: In function ‘names_init’:
names.c:803: warning: assignment makes pointer from integer without a cast

Quoted 8 lines
Quoted 1 line

Care to provide a patch for this?

To be honest, I do not know the reason of the warning. It looks fine to me but I am not a real programmer.

In fact, I tried version 0.73 and there is no warning there and the file name.c is the same between 0.73 and 0.81/0.82.

I still do not know the exact reason but it seems to be related to the generated config.h file or zlib.

If I use the file config.h from 0.73, there will be no warning. It is longer than the one generated in 0.82 or git.

And if I undefine HAVE_LIBZ in names.c, there will be no warning.

The warning is not only in gcc 4.4.0, but also in gcc 4.3.3.

Signature · 1 line
Xiaofan http://mcuee.blogspot.com
#5 lore raw
Quoted 10 lines · Xiaofan Chen

I still do not know the exact reason but it seems to be related to the generated config.h file or zlib.

If I use the file config.h from 0.73, there will be no warning. It is longer than the one generated in 0.82 or git.

And if I undefine HAVE_LIBZ in names.c, there will be no warning.

The warning is not only in gcc 4.4.0, but also in gcc 4.3.3.

I think the problem is in zlib. I got the warning under Ubuntu 9.04 (gcc 4.3.2 and zlib 1.2.3.3) and Arch Linux (gcc 4.4.0 and zlib 1.2.3.3).

zlib 1.2.3.3 in Ubuntu 9.04 and Arch Linux

typedef voidp gzFile;

/*
ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode));

Opens a gzip (.gz) file for reading or writing. The mode parameter
is as in fopen ("rb" or "wb") but can also include a compression level ("wb9") or a strategy: 'f' for filtered data as in "wb6f", 'h' for Huffman only compression as in "wb1h", or 'R' for run-length encoding as in "wb1R". (See the description of deflateInit2 for more information about the strategy parameter.)

gzopen can be used to read a file which is not in gzip format; in this
case gzread will directly read from the file without decompression.

gzopen returns NULL if the file could not be opened or if there was
insufficient memory to allocate the (de)compression state; errno can be checked to distinguish the two cases (if errno is zero, the zlib error is Z_MEM_ERROR). */

ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode)); /*
gzdopen() associates a gzFile with the file descriptor fd. File
descriptors are obtained from calls like open, dup, creat, pipe or fileno (in the file has been previously opened with fopen). The mode parameter is as in gzopen.
The next call of gzclose on the returned gzFile will also close the
file descriptor fd, just like fclose(fdopen(fd), mode) closes the file descriptor fd. If you want to keep fd open, use gzdopen(dup(fd), mode).
gzdopen returns NULL if there was insufficient memory to allocate
the (de)compression state.
*/

I got no warning under Fedora 10 (gcc 4.3.3 and zlib 1.2.3).

zlib 1.2.3 in Fedora 10. But this seems strange. It defines two version of gzopen. The first one seems to be used so that no warning is caused.

typedef voidp gzFile;

ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode)); /*
Opens a gzip (.gz) file for reading or writing. The mode parameter
is as in fopen ("rb" or "wb") but can also include a compression level ("wb9") or a strategy: 'f' for filtered data as in "wb6f", 'h' for Huffman only compression as in "wb1h", or 'R' for run-length encoding as in "wb1R". (See the description of deflateInit2 for more information about the strategy parameter.)

gzopen can be used to read a file which is not in gzip format; in this
case gzread will directly read from the file without decompression.

gzopen returns NULL if the file could not be opened or if there was
insufficient memory to allocate the (de)compression state; errno can be checked to distinguish the two cases (if errno is zero, the zlib error is Z_MEM_ERROR). */

ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode)); /*
gzdopen() associates a gzFile with the file descriptor fd. File
descriptors are obtained from calls like open, dup, creat, pipe or fileno (in the file has been previously opened with fopen). The mode parameter is as in gzopen.
The next call of gzclose on the returned gzFile will also close the
file descriptor fd, just like fclose(fdopen(fd), mode) closes the file descriptor fd. If you want to keep fd open, use gzdopen(dup(fd), mode).
gzdopen returns NULL if there was insufficient memory to allocate
the (de)compression state.
*/

Signature · 1 line
Xiaofan http://mcuee.blogspot.com
#6 lore raw
In reply to Greg KH
Quoted 6 lines · Greg KH

Here's the 0.82 release of usbutils.

Many bugs with autoconf were resolved to hopefully make it easier for distros to find where the usb.ids file is dynamically.  Wireless USB device support was added, as well as other bugfixes.  The full shortlog is below.

By the way, the issue with "lsusb -t" has not been solved.

mcuee@ubuntu904:~/Desktop/build/usbutils/usbutils-0.82$ lsusb -t
2-2:1.0: No such file or directory
2-8:1.0: No such file or directory
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ohci_hcd/8p, 12M
    |__ Port 1: Dev 2, If 0, Class=stor., Driver=usb-storage, 12M
    |__ Port 2: Dev 3, If 0, Class=HID, Driver=, 12M
    |__ Port 4: Dev 4, If 0, Class=HID, Driver=usbhid, 1.5M
    |__ Port 5: Dev 5, If 0, Class=vend., Driver=ftdi_sio, 12M
    |__ Port 7: Dev 6, If 0, Class=HID, Driver=usbhid, 12M
    |__ Port 8: Dev 7, If 0, Class=vend., Driver=, 12M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci_hcd/8p, 480M
Signature · 1 line
Xiaofan http://mcuee.blogspot.com
author
#7 lore raw
Quoted 9 lines · Xiaofan Chen
Quoted 6 lines · Greg KH

Here's the 0.82 release of usbutils.

Many bugs with autoconf were resolved to hopefully make it easier for distros to find where the usb.ids file is dynamically.  Wireless USB device support was added, as well as other bugfixes.  The full shortlog is below.

By the way, the issue with "lsusb -t" has not been solved.

Yes, it's an interm fix before I get the time to hook into libudev...

If anyone wants to provide patches to fix this before then, I'll gladly take them :)

thanks,

greg k-h