Compare commits
1 commit
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
09332faccc |
2 changed files with 40 additions and 1 deletions
34
usbutils-006-lsub-t_loop.patch
Normal file
34
usbutils-006-lsub-t_loop.patch
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
diff --git a/lsusb-t.c b/lsusb-t.c
|
||||
index 074dafb..3e29072 100644
|
||||
--- a/lsusb-t.c
|
||||
+++ b/lsusb-t.c
|
||||
@@ -210,8 +210,13 @@ static void read_sysfs_file_string(const char *d_name, const char *file, char *b
|
||||
|
||||
static void append_dev_interface(struct usbinterface *i, struct usbinterface *new)
|
||||
{
|
||||
- while (i->next)
|
||||
+ while (i->next) {
|
||||
+ if (i == new)
|
||||
+ return;
|
||||
i = i->next;
|
||||
+ }
|
||||
+ if (i == new)
|
||||
+ return;
|
||||
i->next = new;
|
||||
}
|
||||
|
||||
@@ -230,8 +235,13 @@ static void append_businterface(unsigned int busnum, struct usbinterface *new)
|
||||
if (b->busnum == busnum) {
|
||||
i = b->first_interface;
|
||||
if (i) {
|
||||
- while (i->next)
|
||||
+ while (i->next) {
|
||||
+ if (i == new)
|
||||
+ return;
|
||||
i = i->next;
|
||||
+ }
|
||||
+ if (i == new)
|
||||
+ return;
|
||||
i->next = new;
|
||||
} else
|
||||
b->first_interface = new;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
Name: usbutils
|
||||
Version: 004
|
||||
Release: 4%{?dist}
|
||||
Release: 5%{?dist}
|
||||
Source: http://www.kernel.org/pub/linux/utils/usb/usbutils/%{name}-%{version}.tar.gz
|
||||
URL: http://www.linux-usb.org/
|
||||
License: GPLv2+
|
||||
|
|
@ -15,6 +15,7 @@ Patch0: usbutils-003-hwdata.patch
|
|||
#Path to usb.ids should be with /hwdata/
|
||||
Patch1: usbutils-make-hwdata.patch
|
||||
Patch2: usbutils-005-readlink.patch
|
||||
Patch3: usbutils-006-lsub-t_loop.patch
|
||||
|
||||
%description
|
||||
This package contains utilities for inspecting devices connected to a
|
||||
|
|
@ -25,6 +26,7 @@ USB bus.
|
|||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
autoreconf
|
||||
|
||||
%build
|
||||
|
|
@ -46,6 +48,9 @@ make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
|
|||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%changelog
|
||||
* Tue Feb 26 2013 Lukáš Nykrýn <lnykryn@redhat.com> - 004-5
|
||||
- lsusb-t: make sure that interfaces are added to lists only once (#814087)
|
||||
|
||||
* Thu Apr 19 2012 Lukas Nykryn <lnykryn@redhat.com> 004-4
|
||||
- Ignore missing driver symlink (#808934)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue