aboutsummaryrefslogtreecommitdiff
path: root/hw/usb/desc-msos.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2014-04-24 16:16:57 +0100
committerPeter Maydell <peter.maydell@linaro.org>2014-04-24 16:16:57 +0100
commit0e96643c98eb22a5f2e11ac500852133032d38e4 (patch)
treebdc813fc96a2ab61c004696c88f26b755895e99f /hw/usb/desc-msos.c
parentad600a4d49293f6b8eda7932f90e5aa5fa2021b0 (diff)
parent840a178c94dbd3f5b5550fb8621620cb761de72d (diff)
Merge remote-tracking branch 'remotes/kraxel/tags/pull-usb-5' into staging
usb: mtp filesharing # gpg: Signature made Wed 23 Apr 2014 09:28:37 BST using RSA key ID D3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" * remotes/kraxel/tags/pull-usb-5: usb: mtp filesharing usb: add CompatibleID support to msos Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/usb/desc-msos.c')
-rw-r--r--hw/usb/desc-msos.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/hw/usb/desc-msos.c b/hw/usb/desc-msos.c
index ed8d62cab8..334d1aea8d 100644
--- a/hw/usb/desc-msos.c
+++ b/hw/usb/desc-msos.c
@@ -44,7 +44,7 @@ typedef struct msos_compat_hdr {
typedef struct msos_compat_func {
uint8_t bFirstInterfaceNumber;
uint8_t reserved_1;
- uint8_t compatibleId[8];
+ char compatibleId[8];
uint8_t subCompatibleId[8];
uint8_t reserved_2[6];
} QEMU_PACKED msos_compat_func;
@@ -59,6 +59,10 @@ static int usb_desc_msos_compat(const USBDesc *desc, uint8_t *dest)
func = (void *)(dest + length);
func->bFirstInterfaceNumber = 0;
func->reserved_1 = 0x01;
+ if (desc->msos->CompatibleID) {
+ snprintf(func->compatibleId, sizeof(func->compatibleId),
+ "%s", desc->msos->CompatibleID);
+ }
length += sizeof(*func);
count++;