Ignore missing driver symlink (#808934)
This commit is contained in:
parent
3279803c12
commit
c409919b38
37
usbutils-005-readlink.patch
Normal file
37
usbutils-005-readlink.patch
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
diff --git a/lsusb-t.c b/lsusb-t.c
|
||||||
|
index 5438704..c8ab1b9 100644
|
||||||
|
--- a/lsusb-t.c
|
||||||
|
+++ b/lsusb-t.c
|
||||||
|
@@ -330,9 +330,7 @@ static void add_usb_interface(const char *d_name)
|
||||||
|
l = snprintf(link, MY_PATH_MAX, "%s/%s/driver", sys_bus_usb_devices, d_name);
|
||||||
|
if (l > 0 && l < MY_PATH_MAX) {
|
||||||
|
l = readlink(link, link, MY_PATH_MAX);
|
||||||
|
- if (l < 0)
|
||||||
|
- perror(d_name);
|
||||||
|
- else {
|
||||||
|
+ if (l >= 0) {
|
||||||
|
if (l < MY_PATH_MAX - 1)
|
||||||
|
link[l] = '\0';
|
||||||
|
else
|
||||||
|
@@ -395,9 +393,7 @@ static void add_usb_device(const char *d_name)
|
||||||
|
l = snprintf(link, MY_PATH_MAX, "%s/%s/driver", sys_bus_usb_devices, d_name);
|
||||||
|
if (l > 0 && l < MY_PATH_MAX) {
|
||||||
|
l = readlink(link, link, MY_PATH_MAX);
|
||||||
|
- if (l < 0)
|
||||||
|
- perror(d_name);
|
||||||
|
- else {
|
||||||
|
+ if (l >= 0) {
|
||||||
|
if (l < MY_PATH_MAX - 1)
|
||||||
|
link[l] = '\0';
|
||||||
|
else
|
||||||
|
@@ -418,9 +414,7 @@ static void get_roothub_driver(struct usbbusnode *b, const char *d_name)
|
||||||
|
l = snprintf(path, MY_PATH_MAX, "%s/%s/../driver", sys_bus_usb_devices, d_name);
|
||||||
|
if (l > 0 && l < MY_PATH_MAX) {
|
||||||
|
l = readlink(path, path, MY_PATH_MAX);
|
||||||
|
- if (l < 0)
|
||||||
|
- perror(d_name);
|
||||||
|
- else {
|
||||||
|
+ if (l >= 0) {
|
||||||
|
if (l < MY_PATH_MAX - 1)
|
||||||
|
path[l] = '\0';
|
||||||
|
else
|
@ -1,6 +1,6 @@
|
|||||||
Name: usbutils
|
Name: usbutils
|
||||||
Version: 004
|
Version: 004
|
||||||
Release: 3%{?dist}
|
Release: 4%{?dist}
|
||||||
Source: http://www.kernel.org/pub/linux/utils/usb/usbutils/%{name}-%{version}.tar.gz
|
Source: http://www.kernel.org/pub/linux/utils/usb/usbutils/%{name}-%{version}.tar.gz
|
||||||
URL: http://www.linux-usb.org/
|
URL: http://www.linux-usb.org/
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
@ -14,6 +14,7 @@ Conflicts: hotplug < 3:2002_01_14-2
|
|||||||
Patch0: usbutils-003-hwdata.patch
|
Patch0: usbutils-003-hwdata.patch
|
||||||
#Path to usb.ids should be with /hwdata/
|
#Path to usb.ids should be with /hwdata/
|
||||||
Patch1: usbutils-make-hwdata.patch
|
Patch1: usbutils-make-hwdata.patch
|
||||||
|
Patch2: usbutils-005-readlink.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
This package contains utilities for inspecting devices connected to a
|
This package contains utilities for inspecting devices connected to a
|
||||||
@ -23,6 +24,7 @@ USB bus.
|
|||||||
%setup -q
|
%setup -q
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
|
%patch2 -p1
|
||||||
autoreconf
|
autoreconf
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -44,6 +46,9 @@ make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
|
|||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Apr 19 2012 Lukas Nykryn <lnykryn@redhat.com> 004-4
|
||||||
|
- Ignore missing driver symlink (#808934)
|
||||||
|
|
||||||
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 004-3
|
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 004-3
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user