mirror of
https://github.com/palera1n/palera1n.git
synced 2026-10-21 09:47:01 +02:00
silence some more USB errors on boot
This commit is contained in:
1 parent
623cd45286
commit
9df5f68590
2 files changed
+7
-5
No files matched your search
+3
-1
@@ -31,6 +31,7 @@
|
||||
#define USB_RET_SUCCESS LIBUSB_SUCCESS
|
||||
#define USB_RET_NOT_RESPONDING LIBUSB_ERROR_OTHER
|
||||
#define USB_RET_IO LIBUSB_ERROR_IO
|
||||
#define USB_RET_NO_DEVICE LIBUSB_ERROR_NO_DEVICE
|
||||
typedef int usb_ret_t;
|
||||
typedef libusb_device_handle *usb_device_handle_t;
|
||||
|
||||
@@ -51,7 +52,8 @@ usb_ret_t USBBulkUpload(usb_device_handle_t handle, void *data, int len);
|
||||
|
||||
#define USB_RET_SUCCESS KERN_SUCCESS
|
||||
#define USB_RET_NOT_RESPONDING kIOReturnNotResponding
|
||||
#define USB_RET_IO kIOReturnNotResponding
|
||||
#define USB_RET_IO kIOReturnNotReady
|
||||
#define USB_RET_NO_DEVICE kIOReturnNoDevice
|
||||
|
||||
typedef IOReturn usb_ret_t;
|
||||
typedef IOUSBInterfaceInterface245 **usb_device_handle_t;
|
||||
|
||||
+4
-4
@@ -129,10 +129,10 @@ fetch_output:
|
||||
bad:
|
||||
if (ret != USB_RET_SUCCESS)
|
||||
{
|
||||
if (ret == USB_RET_NOT_RESPONDING)
|
||||
return 0;
|
||||
if (command != NULL && (!strncmp("boot", command, 4) && ret == USB_RET_IO))
|
||||
return 0;
|
||||
if (command != NULL && (!strncmp("boot", command, 4))) {
|
||||
if (ret == USB_RET_IO || ret == USB_RET_NO_DEVICE || ret == USB_RET_NOT_RESPONDING)
|
||||
return 0;
|
||||
}
|
||||
LOG(LOG_ERROR, "USB error: %s", usb_strerror(ret));
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user