From b6b8033efd5e9bcc6907dbe4cda91d9b6fb55f2c Mon Sep 17 00:00:00 2001 From: Nick Chan Date: Wed, 18 Jan 2023 01:47:43 +0800 Subject: [PATCH] silence some errors that is not actually an error --- src/common.h | 1 + src/pongo_usb.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/common.h b/src/common.h index 7d58f80..c42cb1f 100644 --- a/src/common.h +++ b/src/common.h @@ -70,6 +70,7 @@ typedef libusb_device_handle *usb_device_handle_t; #define USB_RET_SUCCESS LIBUSB_SUCCESS #define USB_RET_NOT_RESPONDING LIBUSB_ERROR_OTHER +#define USB_RET_IO LIBUSB_ERROR_IO extern void* pongo_usb_callback(void* arg); usb_ret_t USBControlTransfer(usb_device_handle_t handle, uint8_t bmRequestType, uint8_t bRequest, uint16_t wValue, uint16_t wIndex, uint32_t wLength, void *data, uint32_t *wLenDone); diff --git a/src/pongo_usb.c b/src/pongo_usb.c index 3e05d7d..bf54b8d 100644 --- a/src/pongo_usb.c +++ b/src/pongo_usb.c @@ -373,6 +373,8 @@ bad: { if (ret == USB_RET_NOT_RESPONDING) return 0; + if (!strncmp("boot", command, 4) && ret == USB_RET_IO) + return 0; LOG(LOG_ERROR, "USB error: %s", usb_strerror(ret)); return ret; }