From 8b39e7320901a7551ec7cbf2574be22fc6d31ed6 Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Sat, 18 Aug 2007 18:45:49 +0000 Subject: [PATCH] Print class, subclass and protocol field as hex numbers. This fits general usage and documentation. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22009 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/bin/usb_dev_info.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/bin/usb_dev_info.cpp b/src/bin/usb_dev_info.cpp index a316a45424..80d795b2c4 100644 --- a/src/bin/usb_dev_info.cpp +++ b/src/bin/usb_dev_info.cpp @@ -16,9 +16,9 @@ DumpInterface(const BUSBInterface *interface) if (!interface) return; - printf(" Class .............. %d\n", interface->Class()); - printf(" Subclass ........... %d\n", interface->Subclass()); - printf(" Protocol ........... %d\n", interface->Protocol()); + printf(" Class .............. 0x%02x\n", interface->Class()); + printf(" Subclass ........... 0x%02x\n", interface->Subclass()); + printf(" Protocol ........... 0x%02x\n", interface->Protocol()); printf(" Interface String ... \"%s\"\n", interface->InterfaceString()); for (uint32 i = 0; i < interface->CountEndpoints(); i++) { @@ -77,9 +77,9 @@ static void DumpInfo(BUSBDevice &device) { printf("[Device]\n"); - printf("Class .................. %d\n", device.Class()); - printf("Subclass ............... %d\n", device.Subclass()); - printf("Protocol ............... %d\n", device.Protocol()); + printf("Class .................. 0x%02x\n", device.Class()); + printf("Subclass ............... 0x%02x\n", device.Subclass()); + printf("Protocol ............... 0x%02x\n", device.Protocol()); printf("Max Endpoint 0 Packet .. %d\n", device.MaxEndpoint0PacketSize()); printf("USB Version ............ 0x%04x\n", device.USBVersion()); printf("Vendor ID .............. 0x%04x\n", device.VendorID());