Always show class
This commit is contained in:
parent
a17b90f0ec
commit
03f286ea9f
1 changed files with 10 additions and 10 deletions
|
@ -29,11 +29,11 @@
|
||||||
|
|
||||||
static const char *usb_classes[] =
|
static const char *usb_classes[] =
|
||||||
{
|
{
|
||||||
"",
|
"Unknown",
|
||||||
"Audio",
|
"Audio",
|
||||||
"Communication Interface",
|
"Communication Interface",
|
||||||
"HID",
|
"HID",
|
||||||
"",
|
"Unknown",
|
||||||
"Physical",
|
"Physical",
|
||||||
"Image",
|
"Image",
|
||||||
"Printer",
|
"Printer",
|
||||||
|
@ -138,10 +138,10 @@ usb_iterate (grub_usb_device_t dev)
|
||||||
usb_print_str ("Vendor", dev, descdev->strvendor);
|
usb_print_str ("Vendor", dev, descdev->strvendor);
|
||||||
usb_print_str ("Serial", dev, descdev->strserial);
|
usb_print_str ("Serial", dev, descdev->strserial);
|
||||||
|
|
||||||
if (descdev->class > 0 && descdev->class <= 0x0E)
|
grub_printf ("Class: (0x%02x) %s, Subclass: 0x%02x, Protocol: 0x%02x\n",
|
||||||
grub_printf ("Class: (0x%02x) %s, Subclass: 0x%02x, Protocol: 0x%02x\n",
|
descdev->class, descdev->class < ARRAY_SIZE (usb_classes)
|
||||||
descdev->class, usb_classes[descdev->class],
|
? usb_classes[descdev->class] : "Unknown",
|
||||||
descdev->subclass, descdev->protocol);
|
descdev->subclass, descdev->protocol);
|
||||||
grub_printf ("USB version %d.%d, VendorID: 0x%02x, ProductID: 0x%02x, #conf: %d\n",
|
grub_printf ("USB version %d.%d, VendorID: 0x%02x, ProductID: 0x%02x, #conf: %d\n",
|
||||||
descdev->usbrel >> 8, (descdev->usbrel >> 4) & 0x0F,
|
descdev->usbrel >> 8, (descdev->usbrel >> 4) & 0x0F,
|
||||||
descdev->vendorid, descdev->prodid, descdev->configcnt);
|
descdev->vendorid, descdev->prodid, descdev->configcnt);
|
||||||
|
@ -164,10 +164,10 @@ usb_iterate (grub_usb_device_t dev)
|
||||||
|
|
||||||
grub_printf ("Interface #%d: #Endpoints: %d ",
|
grub_printf ("Interface #%d: #Endpoints: %d ",
|
||||||
i, interf->endpointcnt);
|
i, interf->endpointcnt);
|
||||||
if (interf->class > 0 && interf->class <= 0x0E)
|
grub_printf ("Class: (0x%02x) %s, Subclass: 0x%02x, Protocol: 0x%02x\n",
|
||||||
grub_printf ("Class: (0x%02x) %s, Subclass: 0x%02x, Protocol: 0x%02x\n",
|
interf->class, interf->class < ARRAY_SIZE (usb_classes)
|
||||||
interf->class, usb_classes[interf->class],
|
? usb_classes[interf->class] : "Unknown",
|
||||||
interf->subclass, interf->protocol);
|
interf->subclass, interf->protocol);
|
||||||
|
|
||||||
usb_print_str ("Interface", dev, interf->strif);
|
usb_print_str ("Interface", dev, interf->strif);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue