[usbutils/f17] Ignore missing driver symlink (#808934)
Lukáš Nykrýn
lnykryn at fedoraproject.org
Thu Apr 19 08:34:39 UTC 2012
commit c409919b38fd7fa6b56dce372ddc4daaa9e6fbec
Author: Lukas Nykryn <lnykryn at redhat.com>
Date: Thu Apr 19 10:30:11 2012 +0200
Ignore missing driver symlink (#808934)
usbutils-005-readlink.patch | 37 +++++++++++++++++++++++++++++++++++++
usbutils.spec | 7 ++++++-
2 files changed, 43 insertions(+), 1 deletions(-)
---
diff --git a/usbutils-005-readlink.patch b/usbutils-005-readlink.patch
new file mode 100644
index 0000000..56d55d8
--- /dev/null
+++ b/usbutils-005-readlink.patch
@@ -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
diff --git a/usbutils.spec b/usbutils.spec
index dfd5097..8927d3c 100644
--- a/usbutils.spec
+++ b/usbutils.spec
@@ -1,6 +1,6 @@
Name: usbutils
Version: 004
-Release: 3%{?dist}
+Release: 4%{?dist}
Source: http://www.kernel.org/pub/linux/utils/usb/usbutils/%{name}-%{version}.tar.gz
URL: http://www.linux-usb.org/
License: GPLv2+
@@ -14,6 +14,7 @@ Conflicts: hotplug < 3:2002_01_14-2
Patch0: usbutils-003-hwdata.patch
#Path to usb.ids should be with /hwdata/
Patch1: usbutils-make-hwdata.patch
+Patch2: usbutils-005-readlink.patch
%description
This package contains utilities for inspecting devices connected to a
@@ -23,6 +24,7 @@ USB bus.
%setup -q
%patch0 -p1
%patch1 -p1
+%patch2 -p1
autoreconf
%build
@@ -44,6 +46,9 @@ make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
rm -rf $RPM_BUILD_ROOT
%changelog
+* Thu Apr 19 2012 Lukas Nykryn <lnykryn at redhat.com> 004-4
+- Ignore missing driver symlink (#808934)
+
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 004-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
More information about the scm-commits
mailing list