One more small error handling fix
This commit is contained in:
parent
cd757587c6
commit
671c062c1a
@ -0,0 +1,32 @@
|
|||||||
|
From 1cc5b4a9fb984e83681ae5c797fa6b22bc20f809 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ludovic Rousseau <ludovic.rousseau+github@gmail.com>
|
||||||
|
Date: Fri, 16 Sep 2011 18:07:56 +0200
|
||||||
|
Subject: [PATCH 01/40] Correctly handle LIBUSB_TRANSFER_OVERFLOW in
|
||||||
|
libusb_control_transfer()
|
||||||
|
|
||||||
|
sync.c: In function `libusb_control_transfer':
|
||||||
|
sync.c:122: warning: enumeration value `LIBUSB_TRANSFER_OVERFLOW' not
|
||||||
|
handled in switch
|
||||||
|
|
||||||
|
Fixes #120.
|
||||||
|
---
|
||||||
|
libusb/sync.c | 3 +++
|
||||||
|
1 file changed, 3 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/libusb/sync.c b/libusb/sync.c
|
||||||
|
index d50413b..8eed47b 100644
|
||||||
|
--- a/libusb/sync.c
|
||||||
|
+++ b/libusb/sync.c
|
||||||
|
@@ -132,6 +132,9 @@ int API_EXPORTED libusb_control_transfer(libusb_device_handle *dev_handle,
|
||||||
|
case LIBUSB_TRANSFER_NO_DEVICE:
|
||||||
|
r = LIBUSB_ERROR_NO_DEVICE;
|
||||||
|
break;
|
||||||
|
+ case LIBUSB_TRANSFER_OVERFLOW:
|
||||||
|
+ r = LIBUSB_ERROR_OVERFLOW;
|
||||||
|
+ break;
|
||||||
|
default:
|
||||||
|
usbi_warn(HANDLE_CTX(dev_handle),
|
||||||
|
"unrecognised status code %d", transfer->status);
|
||||||
|
--
|
||||||
|
1.7.9.3
|
||||||
|
|
15
libusb1.spec
15
libusb1.spec
@ -1,7 +1,7 @@
|
|||||||
Summary: A library which allows userspace access to USB devices
|
Summary: A library which allows userspace access to USB devices
|
||||||
Name: libusb1
|
Name: libusb1
|
||||||
Version: 1.0.9
|
Version: 1.0.9
|
||||||
Release: 0.5.rc1%{?dist}
|
Release: 0.6.rc1%{?dist}
|
||||||
# This is a git snapshot of what will hopefully soon become 1.0.9, but
|
# This is a git snapshot of what will hopefully soon become 1.0.9, but
|
||||||
# we need this now, to get things in place for:
|
# we need this now, to get things in place for:
|
||||||
# http://fedoraproject.org/wiki/Features/UsbNetworkRedirection
|
# http://fedoraproject.org/wiki/Features/UsbNetworkRedirection
|
||||||
@ -15,10 +15,11 @@ Release: 0.5.rc1%{?dist}
|
|||||||
Source0: libusb-1.0.9-rc1.tar.bz2
|
Source0: libusb-1.0.9-rc1.tar.bz2
|
||||||
#Source0: http://downloads.sourceforge.net/libusb/libusb-%{version}.tar.bz2
|
#Source0: http://downloads.sourceforge.net/libusb/libusb-%{version}.tar.bz2
|
||||||
|
|
||||||
Patch1: 0001-linux-Fix-cancel_transfer-return-value-when-cancelli.patch
|
Patch1: 0001-Correctly-handle-LIBUSB_TRANSFER_OVERFLOW-in-libusb_.patch
|
||||||
Patch2: 0002-Don-t-print-errors-when-cancel_transfer-fails-with-N.patch
|
Patch2: 0002-linux-Fix-cancel_transfer-return-value-when-cancelli.patch
|
||||||
Patch3: 0003-linux-Fix-handling-of-urb-status-codes.patch
|
Patch3: 0003-Don-t-print-errors-when-cancel_transfer-fails-with-N.patch
|
||||||
Patch4: 0004-linux-Translate-linux-iso-pkt-status-codes-to-libusb.patch
|
Patch4: 0004-linux-Fix-handling-of-urb-status-codes.patch
|
||||||
|
Patch5: 0005-linux-Translate-linux-iso-pkt-status-codes-to-libusb.patch
|
||||||
|
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
@ -64,6 +65,7 @@ This package contains static libraries to develop applications that use libusb1.
|
|||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
%patch3 -p1
|
%patch3 -p1
|
||||||
%patch4 -p1
|
%patch4 -p1
|
||||||
|
%patch5 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure --libdir=/%{_lib}
|
%configure --libdir=/%{_lib}
|
||||||
@ -107,6 +109,9 @@ mv %{buildroot}/%{_lib}/pkgconfig/* %{buildroot}%{_libdir}/pkgconfig/
|
|||||||
/%{_lib}/*.a
|
/%{_lib}/*.a
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Mar 14 2012 Hans de Goede <hdegoede@redhat.com> - 1.0.9-0.6.rc1
|
||||||
|
- One more small error handling fix
|
||||||
|
|
||||||
* Wed Mar 14 2012 Hans de Goede <hdegoede@redhat.com> - 1.0.9-0.5.rc1
|
* Wed Mar 14 2012 Hans de Goede <hdegoede@redhat.com> - 1.0.9-0.5.rc1
|
||||||
- Add some small error handling fixes
|
- Add some small error handling fixes
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user