libusb1/0001-Correctly-handle-LIBUSB_TRANSFER_OVERFLOW-in-libusb_.patch
Mohan Boddu 1859b5c3f5 Unretirement for https://pagure.io/releng/issue/10002
Revert "libusb1 has been replaced with libusbx"

This reverts commit 82dc8c9186.
2021-02-10 19:37:01 -05:00

33 lines
947 B
Diff

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