silence some errors that is not actually an error

This commit is contained in:
Nick Chan committed 2023-01-18 01:47:43 +08:00
1 parent ec586d7258
commit b6b8033efd
2 files changed
+3

No files matched your search

+1
View File
@@ -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);
+2
View File
@@ -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;
}