[PATCH 2/4 dfu-util] main: Print USB ID without 0x prefix

Tormod Volden lists.tormod at gmail.com
Thu Sep 15 22:08:01 CEST 2011

From: Tormod Volden <debian.tormod at gmail.com>

USB IDs are always printed in hex and any 0x prefix makes it
just harder to read, recognize or cut and paste.

Signed-off-by: Tormod Volden <debian.tormod at gmail.com>

Also rather cosmetic.

 src/main.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/main.c b/src/main.c
index 64c8d1a..0312603 100644
--- a/src/main.c
+++ b/src/main.c
@@ -227,7 +227,7 @@ static int print_dfu_if(struct dfu_if *dfu_if, void *v)
 	get_alt_name(dfu_if, name);
-	printf("Found %s: [0x%04x:0x%04x] devnum=%u, cfg=%u, intf=%u, "
+	printf("Found %s: [%04x:%04x] devnum=%u, cfg=%u, intf=%u, "
 	       "alt=%u, name=\"%s\"\n", 
 	       dfu_if->flags & DFU_IFF_DFU ? "DFU" : "Runtime",
 	       dfu_if->vendor, dfu_if->product, dfu_if->devnum,

More information about the devel mailing list