mirror of
https://github.com/RPCS3/libusb.git
synced 2026-01-31 01:25:19 +01:00
Windows: Add check for ERROR_FILE_NOT_FOUND, which means device removed
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
This commit is contained in:
@@ -486,6 +486,10 @@ static void windows_transfer_callback(struct usbi_transfer *itransfer, uint32_t
|
||||
usbi_dbg("detected operation aborted");
|
||||
status = LIBUSB_TRANSFER_CANCELLED;
|
||||
break;
|
||||
case ERROR_FILE_NOT_FOUND:
|
||||
usbi_dbg("detected device removed");
|
||||
status = LIBUSB_TRANSFER_NO_DEVICE;
|
||||
break;
|
||||
default:
|
||||
usbi_err(ITRANSFER_CTX(itransfer), "detected I/O error %u: %s", io_result, windows_error_str(io_result));
|
||||
status = LIBUSB_TRANSFER_ERROR;
|
||||
|
||||
@@ -1 +1 @@
|
||||
#define LIBUSB_NANO 11272
|
||||
#define LIBUSB_NANO 11273
|
||||
|
||||
Reference in New Issue
Block a user