]> Git Repo - qemu.git/commitdiff
usb: add CompatibleID support to msos
authorGerd Hoffmann <[email protected]>
Tue, 18 Mar 2014 10:01:50 +0000 (11:01 +0100)
committerGerd Hoffmann <[email protected]>
Tue, 22 Apr 2014 10:40:57 +0000 (12:40 +0200)
Signed-off-by: Gerd Hoffmann <[email protected]>
hw/usb/desc-msos.c
hw/usb/desc.h

index ed8d62cab89da23ba0bf515ef3e3c087b4f8a9a4..334d1aea8dd929ef7353e89e11d3e998acef465a 100644 (file)
@@ -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++;
 
index 2b4fcdae76eefc71969366e53e03dd34508d44c9..8e8db03a0caa3b2932b2d2e4a606185d7ca3dc5c 100644 (file)
@@ -184,6 +184,7 @@ struct USBDescOther {
 };
 
 struct USBDescMSOS {
+    const char                *CompatibleID;
     const wchar_t             *Label;
     bool                      SelectiveSuspendEnabled;
 };
This page took 0.026987 seconds and 4 git commands to generate.