Matt Kraai a écrit :
Package: libusb-1.0-0
Version: 2:0.9.3-2
Severity: wishlist

I wish there was a function to convert error codes into strings that
could be used in error messages.

libusb-0.1.x provides usb_strerror() but libusb-1.0.x has no equivalent.

All libusb-1.0.x has is:

/** \ingroup misc
 * Error codes. Most libusb functions return 0 on success or one of these
 * codes on failure.
 */
enum libusb_error {
        /** Success (no error) */
        LIBUSB_SUCCESS = 0,

        /** Input/output error */
        LIBUSB_ERROR_IO = -1,

        /** Invalid parameter */
        LIBUSB_ERROR_INVALID_PARAM = -2,

        /** Access denied (insufficient permissions) */
        LIBUSB_ERROR_ACCESS = -3,

        /** No such device (it may have been disconnected) */
        LIBUSB_ERROR_NO_DEVICE = -4,

        /** Entity not found */
        LIBUSB_ERROR_NOT_FOUND = -5,

        /** Resource busy */
        LIBUSB_ERROR_BUSY = -6,

        /** Operation timed out */
        LIBUSB_ERROR_TIMEOUT = -7,

        /** Overflow */
        LIBUSB_ERROR_OVERFLOW = -8,

        /** Pipe error */
        LIBUSB_ERROR_PIPE = -9,

        /** System call interrupted (perhaps due to signal) */
        LIBUSB_ERROR_INTERRUPTED = -10,

        /** Insufficient memory */
        LIBUSB_ERROR_NO_MEM = -11,

        /** Operation not supported or unimplemented on this platform */
        LIBUSB_ERROR_NOT_SUPPORTED = -12,

        /** Other error */
        LIBUSB_ERROR_OTHER = -99
};


--
 Dr. Ludovic Rousseau



--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to