diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2010-11-26 12:25:32 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2011-01-11 15:56:00 +0100 |
commit | 132a3f55f05dff4eedde0d23d844ecdedef8ba68 (patch) | |
tree | 8176c0595559cd176b778b3298b047969ae4421b /hw/usb-desc.h | |
parent | 062651c7e750a0c06a693d336c2b9edb893a2c94 (diff) |
usb descriptors: add settable strings.
This patch allows to set usb descriptor strings per device instance.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/usb-desc.h')
-rw-r--r-- | hw/usb-desc.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/usb-desc.h b/hw/usb-desc.h index d80efdb24f..20fc4006c0 100644 --- a/hw/usb-desc.h +++ b/hw/usb-desc.h @@ -76,9 +76,11 @@ int usb_desc_config(const USBDescConfig *conf, uint8_t *dest, size_t len); int usb_desc_iface(const USBDescIface *iface, uint8_t *dest, size_t len); int usb_desc_endpoint(const USBDescEndpoint *ep, uint8_t *dest, size_t len); int usb_desc_other(const USBDescOther *desc, uint8_t *dest, size_t len); -int usb_desc_string(const char* const *str, int index, uint8_t *dest, size_t len); /* control message emulation helpers */ +void usb_desc_set_string(USBDevice *dev, uint8_t index, const char *str); +const char *usb_desc_get_string(USBDevice *dev, uint8_t index); +int usb_desc_string(USBDevice *dev, int index, uint8_t *dest, size_t len); int usb_desc_get_descriptor(USBDevice *dev, int value, uint8_t *dest, size_t len); int usb_desc_handle_control(USBDevice *dev, int request, int value, int index, int length, uint8_t *data); |