diff options
author | Pete Batard <pbatard@gmail.com> | 2010-02-15 21:08:00 +0000 |
---|---|---|
committer | Pete Batard <pbatard@gmail.com> | 2010-02-15 21:08:00 +0000 |
commit | 3efb8b6f75be22c4b037c9094d4560753d77cccc (patch) | |
tree | 7e8d897b22cfb55a5e89e3153fd69b4558ce806f /libusb | |
parent | 03e9371a460031dcb599a1cf504539667cf12f1c (diff) | |
download | libusb-3efb8b6f75be22c4b037c9094d4560753d77cccc.tar.gz |
fixed libusb_strerror to be in line with core patch 6/7r154
Diffstat (limited to 'libusb')
-rw-r--r-- | libusb/core.c | 66 |
1 files changed, 32 insertions, 34 deletions
diff --git a/libusb/core.c b/libusb/core.c index 1e9977b..4e812ed 100644 --- a/libusb/core.c +++ b/libusb/core.c @@ -1624,38 +1624,36 @@ void usbi_log(struct libusb_context *ctx, enum usbi_log_level level, */ API_EXPORTED const char* libusb_strerror(enum libusb_error errcode) { - switch (errcode) - { - case LIBUSB_SUCCESS: - return "Success"; - case LIBUSB_ERROR_IO: - return "Input/output error"; - case LIBUSB_ERROR_INVALID_PARAM: - return "Invalid parameter"; - case LIBUSB_ERROR_ACCESS: - return "Access denied (insufficient permissions)"; - case LIBUSB_ERROR_NO_DEVICE: - return "No such device (it may have been disconnected)"; - case LIBUSB_ERROR_NOT_FOUND: - return "Entity not found"; - case LIBUSB_ERROR_BUSY: - return "Resource busy"; - case LIBUSB_ERROR_TIMEOUT: - return "Operation timed out"; - case LIBUSB_ERROR_OVERFLOW: - return "Overflow"; - case LIBUSB_ERROR_PIPE: - return "Pipe error"; - case LIBUSB_ERROR_INTERRUPTED: - return "System call interrupted (perhaps due to signal)"; - case LIBUSB_ERROR_NO_MEM: - return "Insufficient memory"; - case LIBUSB_ERROR_NOT_SUPPORTED: - return "Operation not supported or unimplemented on this platform"; - case LIBUSB_ERROR_OTHER: - return "Other error"; - - default: - return "Unknown error"; - } + switch (errcode) + { + case LIBUSB_SUCCESS: + return "Success"; + case LIBUSB_ERROR_IO: + return "Input/output error"; + case LIBUSB_ERROR_INVALID_PARAM: + return "Invalid parameter"; + case LIBUSB_ERROR_ACCESS: + return "Access denied (insufficient permissions)"; + case LIBUSB_ERROR_NO_DEVICE: + return "No such device (it may have been disconnected)"; + case LIBUSB_ERROR_NOT_FOUND: + return "Entity not found"; + case LIBUSB_ERROR_BUSY: + return "Resource busy"; + case LIBUSB_ERROR_TIMEOUT: + return "Operation timed out"; + case LIBUSB_ERROR_OVERFLOW: + return "Overflow"; + case LIBUSB_ERROR_PIPE: + return "Pipe error"; + case LIBUSB_ERROR_INTERRUPTED: + return "System call interrupted (perhaps due to signal)"; + case LIBUSB_ERROR_NO_MEM: + return "Insufficient memory"; + case LIBUSB_ERROR_NOT_SUPPORTED: + return "Operation not supported or unimplemented on this platform"; + case LIBUSB_ERROR_OTHER: + return "Other error"; + } + return "Unknown error"; } |