mirror of
https://github.com/RPCS3/libusb.git
synced 2025-03-04 08:27:00 +00:00
Revert libusb_strerror() until we have i18n and l10n
This commit is contained in:
parent
0e177f22fc
commit
4be84ab49c
1
AUTHORS
1
AUTHORS
@ -12,7 +12,6 @@ Bastien Nocera
|
||||
David Engraf
|
||||
David Moore
|
||||
Felipe Balbi
|
||||
Francesco Montorsi
|
||||
Hans Ulrich Niedermann
|
||||
Hoi-Ho Chan
|
||||
Ludovic Rousseau
|
||||
|
@ -1662,53 +1662,3 @@ void usbi_log(struct libusb_context *ctx, enum usbi_log_level level,
|
||||
usbi_log_v(ctx, level, function, format, args);
|
||||
va_end (args);
|
||||
}
|
||||
|
||||
/** \ingroup misc
|
||||
* Returns a constant NULL-terminated string with an English short description
|
||||
* of the given error code. The caller should never free() the returned pointer
|
||||
* since it points to a constant string.
|
||||
* The returned string is encoded in ASCII form and always starts with a
|
||||
* capital letter and ends without any punctuation.
|
||||
* Future versions of libusb may return NULL if the library is compiled without
|
||||
* these messages included (e.g. for embedded systems).
|
||||
* This function is intended to be used for debugging purposes only.
|
||||
*
|
||||
* \param errcode the error code whose description is desired
|
||||
* \returns a short description of the error code in English, or NULL if the
|
||||
* error descriptions are unavailable
|
||||
*/
|
||||
DEFAULT_VISIBILITY
|
||||
const char * LIBUSB_CALL 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";
|
||||
}
|
||||
return "Unknown error";
|
||||
}
|
||||
|
@ -651,8 +651,6 @@ typedef struct libusb_device_handle libusb_device_handle;
|
||||
/** \ingroup misc
|
||||
* Error codes. Most libusb functions return 0 on success or one of these
|
||||
* codes on failure.
|
||||
* You can use libusb_strerror() to retrieve a short string description of
|
||||
* a libusb_error enumeration value.
|
||||
*/
|
||||
enum libusb_error {
|
||||
/** Success (no error) */
|
||||
@ -696,9 +694,6 @@ enum libusb_error {
|
||||
|
||||
/** Other error */
|
||||
LIBUSB_ERROR_OTHER = -99
|
||||
|
||||
/* IMPORTANT: when adding new values to this enum, remember to
|
||||
update the libusb_strerror() function implementation! */
|
||||
};
|
||||
|
||||
/** \ingroup asyncio
|
||||
@ -837,7 +832,6 @@ struct libusb_transfer {
|
||||
int LIBUSB_CALL libusb_init(libusb_context **ctx);
|
||||
void LIBUSB_CALL libusb_exit(libusb_context *ctx);
|
||||
void LIBUSB_CALL libusb_set_debug(libusb_context *ctx, int level);
|
||||
const char * LIBUSB_CALL libusb_strerror(enum libusb_error errcode);
|
||||
|
||||
ssize_t LIBUSB_CALL libusb_get_device_list(libusb_context *ctx,
|
||||
libusb_device ***list);
|
||||
|
@ -489,8 +489,8 @@ static void auto_release(struct usbi_transfer *itransfer)
|
||||
if (r == LIBUSB_SUCCESS) {
|
||||
usbi_dbg("auto-released interface %d", transfer_priv->interface_number);
|
||||
} else {
|
||||
usbi_dbg("failed to auto-release interface %d (%s)",
|
||||
transfer_priv->interface_number, libusb_strerror(r));
|
||||
usbi_dbg("failed to auto-release interface %d (error=%d)",
|
||||
transfer_priv->interface_number, r);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user