usb_get_string — gets a string descriptor
int usb_get_string ( | struct usb_device * | dev, |
| unsigned short | langid, | |
| unsigned char | index, | |
| void * | buf, | |
| int | size); |
devthe device whose string descriptor is being retrieved
langidcode for language chosen (from string descriptor zero)
indexthe number of the descriptor
bufwhere to put the string
sizehow big is “buf”?
Retrieves a string, encoded using UTF-16LE (Unicode, 16 bits per character,
in little-endian byte order).
The usb_string function will often be a convenient way to turn
these strings into kernel-printable form.
Strings may be referenced in device, configuration, interface, or other descriptors, and could also be used in vendor-specific ways.
This call is synchronous, and may not be used in an interrupt context.
Returns the number of bytes received on success, or else the status code
returned by the underlying usb_control_msg call.