diff options
author | Marcus Meissner <marcus@jet.franken.de> | 2014-07-21 10:45:55 +0000 |
---|---|---|
committer | Marcus Meissner <marcus@jet.franken.de> | 2014-07-21 10:45:55 +0000 |
commit | cfa06c0fe8fa362f02bbb992f27275eabdf3f9f3 (patch) | |
tree | bd42c6f1603e855b0c00ecae75fef7bf6d8a3273 /libgphoto2_port/libusb1 | |
parent | 3bd671729fc2ead15ac1f3835a13165d94faad55 (diff) | |
download | libgphoto2-cfa06c0fe8fa362f02bbb992f27275eabdf3f9f3.tar.gz |
sync error codes with upstream libusb
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@15094 67ed7778-7388-44ab-90cf-0a291f65f57c
Diffstat (limited to 'libgphoto2_port/libusb1')
-rw-r--r-- | libgphoto2_port/libusb1/libusb1.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/libgphoto2_port/libusb1/libusb1.c b/libgphoto2_port/libusb1/libusb1.c index 0daba628a..12f7f9b8e 100644 --- a/libgphoto2_port/libusb1/libusb1.c +++ b/libgphoto2_port/libusb1/libusb1.c @@ -82,20 +82,21 @@ static const char *libusb_strerror(int r) { switch (r) { - case LIBUSB_SUCCESS: return "success"; - case LIBUSB_ERROR_INVALID_PARAM: return "invalid parameter"; - case LIBUSB_ERROR_NO_DEVICE: return "no device"; - case LIBUSB_ERROR_TIMEOUT: return "timeout"; - case LIBUSB_ERROR_NO_MEM: return "no memory"; - case LIBUSB_ERROR_NOT_SUPPORTED: return "not supported"; - case LIBUSB_ERROR_IO: return "io error"; - case LIBUSB_ERROR_BUSY: return "busy"; - case LIBUSB_ERROR_NOT_FOUND: return "not found"; - case LIBUSB_ERROR_ACCESS: return "access"; - case LIBUSB_ERROR_OVERFLOW: return "overflow"; - case LIBUSB_ERROR_PIPE: return "pipe"; - case LIBUSB_ERROR_INTERRUPTED: return "interrupted"; - default: return "unknown, fix libusb1.c"; + 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"; } } |