mirror of
https://github.com/RPCS3/libusb.git
synced 2026-07-19 21:03:32 -04:00
Align error code handling with WinUsb
WinUsb uses ERROR_GEN_FAILURE instead of ERROR_FUNCTION_FAILED, this diffrence was observed while using Libusb's xusb example application while alternating backends. Signed-off-by: Sameeh Jubran <sameeh@daynix.com> Reviewed-by: Dmitry Fleytman <dmitry@daynix.com>
This commit is contained in:
committed by
Dmitry Fleytman
parent
fc9962027f
commit
00c7a1625e
@@ -796,16 +796,12 @@ static DWORD usbdk_translate_usbd_status(USBD_STATUS UsbdStatus)
|
||||
return NO_ERROR;
|
||||
|
||||
switch (UsbdStatus) {
|
||||
case USBD_STATUS_STALL_PID:
|
||||
case USBD_STATUS_ENDPOINT_HALTED:
|
||||
case USBD_STATUS_BAD_START_FRAME:
|
||||
return ERROR_GEN_FAILURE;
|
||||
case USBD_STATUS_TIMEOUT:
|
||||
return ERROR_SEM_TIMEOUT;
|
||||
case USBD_STATUS_CANCELED:
|
||||
return ERROR_OPERATION_ABORTED;
|
||||
default:
|
||||
return ERROR_FUNCTION_FAILED;
|
||||
return ERROR_GEN_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user