Hello community,
here is the log from the commit of package usbutils for openSUSE:Factory
checked in at Wed Aug 17 09:53:30 CEST 2011.
--------
--- usbutils/usbutils.changes 2011-06-16 09:55:06.000000000 +0200
+++ /mounts/work_src_done/STABLE/usbutils/usbutils.changes 2011-08-12 23:39:22.000000000 +0200
@@ -1,0 +2,6 @@
+Fri Aug 12 21:29:56 UTC 2011 - gregkh@suse.de
+- usbutils 004
+ - fixes bnc#705562 and a number of other minor things.
+- updated usb.ids file
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
usbutils-002.tar.bz2
New:
----
usbutils-004.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ usbutils.spec ++++++
--- /var/tmp/diff_new_pack.IxjYbL/_old 2011-08-17 09:52:54.000000000 +0200
+++ /var/tmp/diff_new_pack.IxjYbL/_new 2011-08-17 09:52:54.000000000 +0200
@@ -21,7 +21,7 @@
Name: usbutils
BuildRequires: libusb-1_0-devel pkg-config
Url: http://sourceforge.net/projects/linux-usb/
-Version: 002
+Version: 004
Release: 1
License: GPLv2+
BuildRoot: %{_tmppath}/%{name}-%{version}-build
++++++ usb.ids ++++++
++++ 2822 lines (skipped)
++++ between usbutils/usb.ids
++++ and /mounts/work_src_done/STABLE/usbutils/usb.ids
++++++ usbutils-002.tar.bz2 -> usbutils-004.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbutils-002/Makefile.am new/usbutils-004/Makefile.am
--- old/usbutils-002/Makefile.am 2011-01-13 00:09:34.000000000 +0100
+++ new/usbutils-004/Makefile.am 2011-03-22 00:23:33.000000000 +0100
@@ -6,9 +6,6 @@
data_DATA = \
usb.ids
-if HAVE_ZLIB
-data_DATA += usb.ids.gz
-endif
bin_PROGRAMS = \
lsusb
@@ -35,6 +32,12 @@
lsusb_LDADD = \
$(LIBUSB_LIBS)
+if HAVE_ZLIB
+data_DATA += usb.ids.gz
+lsusb_CPPFLAGS += -DHAVE_LIBZ
+lsusb_LDADD += -lz
+endif
+
man_MANS = \
lsusb.8 \
usb-devices.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbutils-002/Makefile.in new/usbutils-004/Makefile.in
--- old/usbutils-002/Makefile.in 2011-03-18 00:19:44.000000000 +0100
+++ new/usbutils-004/Makefile.in 2011-08-12 22:09:31.000000000 +0200
@@ -34,8 +34,10 @@
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-@HAVE_ZLIB_TRUE@am__append_1 = usb.ids.gz
bin_PROGRAMS = lsusb$(EXEEXT)
+@HAVE_ZLIB_TRUE@am__append_1 = usb.ids.gz
+@HAVE_ZLIB_TRUE@am__append_2 = -DHAVE_LIBZ
+@HAVE_ZLIB_TRUE@am__append_3 = -lz
subdir = .
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
@@ -61,7 +63,7 @@
lsusb-usbmisc.$(OBJEXT)
lsusb_OBJECTS = $(am_lsusb_OBJECTS)
am__DEPENDENCIES_1 =
-lsusb_DEPENDENCIES = $(am__DEPENDENCIES_1)
+lsusb_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -280,13 +282,9 @@
devtree.c devtree.h \
usbmisc.c usbmisc.h
-lsusb_CPPFLAGS = \
- $(AM_CPPFLAGS) $(LIBUSB_CFLAGS) \
- -DDATADIR=\"$(datadir)\"
-
-lsusb_LDADD = \
- $(LIBUSB_LIBS)
-
+lsusb_CPPFLAGS = $(AM_CPPFLAGS) $(LIBUSB_CFLAGS) \
+ -DDATADIR=\"$(datadir)\" $(am__append_2)
+lsusb_LDADD = $(LIBUSB_LIBS) $(am__append_3)
man_MANS = \
lsusb.8 \
usb-devices.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbutils-002/NEWS new/usbutils-004/NEWS
--- old/usbutils-002/NEWS 2011-03-18 00:19:26.000000000 +0100
+++ new/usbutils-004/NEWS 2011-08-12 22:09:05.000000000 +0200
@@ -1,3 +1,29 @@
+usbutils 004
+============
+
+Carl-Daniel Hailfinger (2):
+ Fix lsusb out-of-bounds write
+ Fix lsusb double-free
+
+Dafydd Crosby (2):
+ Verbose flag in tree mode shows vendor and product name. When running `lsusb -tv`, devices should have the vendor and product name appended to the row.
+ Fix compiler warning
+
+Greg Kroah-Hartman (2):
+ Merge pull request #2 from nphilipp/master--nphilipp
+ Merge pull request #3 from dafyddcrosby/lsusb-tv
+
+Nils Philippsen (1):
+ don't use invalid config descriptors
+
+
+usbutils 003
+============
+
+Diego Elio Pettenò (1):
+ build-sys: properly enable support for zlib in lsusb
+
+
usbutils 002
============
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbutils-002/configure new/usbutils-004/configure
--- old/usbutils-002/configure 2011-03-18 00:19:45.000000000 +0100
+++ new/usbutils-004/configure 2011-08-12 22:09:31.000000000 +0200
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for usbutils 002.
+# Generated by GNU Autoconf 2.68 for usbutils 004.
#
# Report bugs to .
#
@@ -560,8 +560,8 @@
# Identity of this package.
PACKAGE_NAME='usbutils'
PACKAGE_TARNAME='usbutils'
-PACKAGE_VERSION='002'
-PACKAGE_STRING='usbutils 002'
+PACKAGE_VERSION='004'
+PACKAGE_STRING='usbutils 004'
PACKAGE_BUGREPORT='linux-usb@vger.kernel.org'
PACKAGE_URL=''
@@ -1261,7 +1261,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures usbutils 002 to adapt to many kinds of systems.
+\`configure' configures usbutils 004 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1327,7 +1327,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of usbutils 002:";;
+ short | recursive ) echo "Configuration of usbutils 004:";;
esac
cat <<\_ACEOF
@@ -1426,7 +1426,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-usbutils configure 002
+usbutils configure 004
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1728,7 +1728,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by usbutils $as_me 002, which was
+It was created by usbutils $as_me 004, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2544,7 +2544,7 @@
# Define the identity of the package.
PACKAGE='usbutils'
- VERSION='002'
+ VERSION='004'
cat >>confdefs.h <<_ACEOF
@@ -5062,7 +5062,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by usbutils $as_me 002, which was
+This file was extended by usbutils $as_me 004, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -5128,7 +5128,7 @@
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-usbutils config.status 002
+usbutils config.status 004
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbutils-002/configure.ac new/usbutils-004/configure.ac
--- old/usbutils-002/configure.ac 2011-03-18 00:19:40.000000000 +0100
+++ new/usbutils-004/configure.ac 2011-08-12 22:09:27.000000000 +0200
@@ -1,5 +1,5 @@
AC_INIT([usbutils],
- [002],
+ [004],
[linux-usb@vger.kernel.org])
AC_PREREQ(2.60)
AM_INIT_AUTOMAKE([check-news foreign 1.9 dist-bzip2])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbutils-002/devtree.c new/usbutils-004/devtree.c
--- old/usbutils-002/devtree.c 2010-03-18 01:50:26.000000000 +0100
+++ new/usbutils-004/devtree.c 2011-08-12 22:03:46.000000000 +0200
@@ -38,6 +38,7 @@
#include
#include
+#include "names.h"
#include "devtree.h"
/* ---------------------------------------------------------------------- */
@@ -294,10 +295,12 @@
/* ---------------------------------------------------------------------- */
static void dumpdevlist(struct list_head *list, unsigned int level,
- unsigned int mask)
+ unsigned int mask, unsigned int verblevel)
{
struct usbdevnode *dev;
struct list_head *list2;
+ char vendor[128];
+ char product[128];
char buf[512];
char *cp;
unsigned int i;
@@ -317,15 +320,23 @@
*cp++ = '`';
}
*cp++ = '-';
- snprintf(cp, buf + sizeof(buf) - cp,
- "Dev# %3d Vendor 0x%04x Product 0x%04x",
- dev->devnum, dev->vendorid, dev->productid);
+ if (verblevel > 1) {
+ get_vendor_string(vendor, sizeof(vendor), dev->vendorid);
+ get_product_string(product, sizeof(product), dev->vendorid, dev->productid);
+ snprintf(cp, buf + sizeof(buf) - cp,
+ "Dev# %3d Vendor 0x%04x Product 0x%04x %s %s",
+ dev->devnum, dev->vendorid, dev->productid, vendor, product);
+ } else {
+ snprintf(cp, buf + sizeof(buf) - cp,
+ "Dev# %3d Vendor 0x%04x Product 0x%04x",
+ dev->devnum, dev->vendorid, dev->productid);
+ }
lprintf(1, "%s\n", buf);
- dumpdevlist(&dev->childlist, level+1, mask);
+ dumpdevlist(&dev->childlist, level+1, mask, verblevel);
}
}
-void devtree_dump(void)
+void devtree_dump(unsigned int verblevel)
{
struct list_head *list;
struct usbbusnode *bus;
@@ -333,6 +344,6 @@
for (list = usbbuslist.next; list != &usbbuslist; list = list->next) {
bus = list_entry(list, struct usbbusnode, list);
lprintf(1, "Bus# %2d\n", bus->busnum);
- dumpdevlist(&bus->childlist, 0, 0);
+ dumpdevlist(&bus->childlist, 0, 0, verblevel);
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbutils-002/devtree.h new/usbutils-004/devtree.h
--- old/usbutils-002/devtree.h 2010-03-18 01:50:26.000000000 +0100
+++ new/usbutils-004/devtree.h 2011-08-12 22:03:46.000000000 +0200
@@ -80,7 +80,7 @@
extern void devtree_devconnect(struct usbdevnode *dev);
extern void devtree_devdisconnect(struct usbdevnode *dev);
extern void devtree_processchanges(void);
-extern void devtree_dump(void);
+extern void devtree_dump(unsigned int verblevel);
extern int lprintf(unsigned int vl, const char *format, ...)
__attribute__ ((format (printf, 2, 3)));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbutils-002/lsusb-t.c new/usbutils-004/lsusb-t.c
--- old/usbutils-002/lsusb-t.c 2010-12-15 01:30:34.000000000 +0100
+++ new/usbutils-004/lsusb-t.c 2011-08-12 22:07:27.000000000 +0200
@@ -235,7 +235,7 @@
goto error;
r = read(fd, buf, len);
close(fd);
- if (r >= 0 && r < len) {
+ if (r > 0 && r < len) {
buf[r] = '\0';
r--;
while (buf[r] == '\n') {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbutils-002/lsusb.c new/usbutils-004/lsusb.c
--- old/usbutils-002/lsusb.c 2011-01-13 00:09:41.000000000 +0100
+++ new/usbutils-004/lsusb.c 2011-08-12 22:07:27.000000000 +0200
@@ -207,30 +207,6 @@
}
}
-static int get_vendor_string(char *buf, size_t size, u_int16_t vid)
-{
- const char *cp;
-
- if (size < 1)
- return 0;
- *buf = 0;
- if (!(cp = names_vendor(vid)))
- return 0;
- return snprintf(buf, size, "%s", cp);
-}
-
-static int get_product_string(char *buf, size_t size, u_int16_t vid, u_int16_t pid)
-{
- const char *cp;
-
- if (size < 1)
- return 0;
- *buf = 0;
- if (!(cp = names_product(vid, pid)))
- return 0;
- return snprintf(buf, size, "%s", cp);
-}
-
static int get_class_string(char *buf, size_t size, u_int8_t cls)
{
const char *cp;
@@ -3800,14 +3776,25 @@
if (desc.bNumConfigurations) {
struct libusb_config_descriptor *config;
- libusb_get_config_descriptor(dev, 0, &config);
- otg = do_otg(config) || otg;
- libusb_free_config_descriptor(config);
+ ret = libusb_get_config_descriptor(dev, 0, &config);
+ if (ret) {
+ fprintf(stderr, "Couldn't get configuration descriptor 0, "
+ "some information will be missing\n");
+ } else {
+ otg = do_otg(config) || otg;
+ libusb_free_config_descriptor(config);
+ }
for (i = 0; i < desc.bNumConfigurations; ++i) {
- libusb_get_config_descriptor(dev, i, &config);
- dump_config(udev, config);
- libusb_free_config_descriptor(config);
+ ret = libusb_get_config_descriptor(dev, i, &config);
+ if (ret) {
+ fprintf(stderr, "Couldn't get configuration "
+ "descriptor %d, some information will "
+ "be missing\n", i);
+ } else {
+ dump_config(udev, config);
+ libusb_free_config_descriptor(config);
+ }
}
}
if (!udev)
@@ -3861,6 +3848,8 @@
status = 1; /* 1 device not found, 0 device found */
num_devs = libusb_get_device_list(ctx, &list);
+ if (num_devs < 0)
+ goto error;
for (i = 0; i < num_devs; ++i) {
libusb_device *dev = list[i];
@@ -3890,6 +3879,7 @@
}
libusb_free_device_list(list, 0);
+error:
return status;
}
@@ -3929,7 +3919,7 @@
}
devtree_parsedevfile(fd);
close(fd);
- devtree_dump();
+ devtree_dump(verblevel);
return 0;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbutils-002/names.c new/usbutils-004/names.c
--- old/usbutils-002/names.c 2010-08-13 00:48:17.000000000 +0200
+++ new/usbutils-004/names.c 2011-08-12 22:03:46.000000000 +0200
@@ -270,6 +270,32 @@
/* ---------------------------------------------------------------------- */
+int get_vendor_string(char *buf, size_t size, u_int16_t vid)
+{
+ const char *cp;
+
+ if (size < 1)
+ return 0;
+ *buf = 0;
+ if (!(cp = names_vendor(vid)))
+ return 0;
+ return snprintf(buf, size, "%s", cp);
+}
+
+int get_product_string(char *buf, size_t size, u_int16_t vid, u_int16_t pid)
+{
+ const char *cp;
+
+ if (size < 1)
+ return 0;
+ *buf = 0;
+ if (!(cp = names_product(vid, pid)))
+ return 0;
+ return snprintf(buf, size, "%s", cp);
+}
+
+/* ---------------------------------------------------------------------- */
+
static int new_vendor(const char *name, u_int16_t vendorid)
{
struct vendor *v;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbutils-002/names.h new/usbutils-004/names.h
--- old/usbutils-002/names.h 2010-08-13 00:43:39.000000000 +0200
+++ new/usbutils-004/names.h 2011-08-12 22:03:46.000000000 +0200
@@ -47,6 +47,10 @@
extern const char *names_physdes(u_int8_t ph);
extern const char *names_bias(u_int8_t b);
extern const char *names_countrycode(unsigned int countrycode);
+
+extern int get_vendor_string(char *buf, size_t size, u_int16_t vid);
+extern int get_product_string(char *buf, size_t size, u_int16_t vid, u_int16_t pid);
+
extern int names_init(char *n);
extern void names_exit(void);
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org