From c186259e3181ae2f836aef914837c5abff6820fc Mon Sep 17 00:00:00 2001 From: hselasky Date: Mon, 19 Sep 2011 08:52:06 +0000 Subject: Implement missing USB debug information functions. Approved by: re (kib) MFC after: 1 week --- lib/libusb/libusb20.3 | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'lib/libusb/libusb20.3') diff --git a/lib/libusb/libusb20.3 b/lib/libusb/libusb20.3 index 042f885..b41bec1 100644 --- a/lib/libusb/libusb20.3 +++ b/lib/libusb/libusb20.3 @@ -212,6 +212,10 @@ USB access library (libusb -lusb) .Fn libusb20_me_decode "const void *pdata" "uint16_t len" "void *pdecoded" .Ft "const uint8_t *" .Fn libusb20_desc_foreach "const struct libusb20_me_struct *me" "const uint8_t *pdesc" +.Ft "const char *" +.Fn libusb20_strerror "int code" +.Ft "const char *" +.Fn libusb20_error_name "int code" . . .Sh DESCRIPTION @@ -996,6 +1000,22 @@ The total decoded length is returned. The buffer pointer cannot be NULL. . . +.Sh USB DEBUGGING +.Pp +.Ft const char * +.Fn libusb20_strerror "int code" +Get the ASCII representation of the error given by the +.Fa code +argument. +This function does not return NULL. +.Pp +.Ft const char * +.Fn libusb20_error_name "int code" +Get the ASCII representation of the error enum given by the +.Fa code +argument. +This function does not return NULL. +. .Sh FILES . . @@ -1003,7 +1023,8 @@ The buffer pointer cannot be NULL. .Sh SEE ALSO .Xr usb 4 , .Xr libusb 3 , -.Xr usbconfig 8 +.Xr usbconfig 8 , +.Xr usbdump 8 . . .Sh HISTORY -- cgit v1.1