From 8abd3a255d812c63b37275455c00517383f1141f Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 25 Jan 2010 04:42:05 +0000 Subject: [PATCH] only have device id output pad to size of register and not always to 64bits git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1732 b68d4a1b-bc3d-0410-92ed-d4ac073336b7 --- urjtag/ChangeLog | 3 +++ urjtag/src/tap/detect.c | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/urjtag/ChangeLog b/urjtag/ChangeLog index 5f1e8750..24be72e2 100644 --- a/urjtag/ChangeLog +++ b/urjtag/ChangeLog @@ -9,6 +9,9 @@ * include/urjtag/xpcu.h: Remove unused header. * include/urjtag/urjtag.h.in, include/urjtag/Makefile.am: Remove xpcu.h. + * src/tap/detect.c (urj_tap_detect_parts): Only pad hex output to the actual + register size rather than always 64 bits. + 2010-01-24 Arnim Laeuger * src/tap/usbconn/libftd2xx.c: const urj_tap_usbconn_ftd2xx_driver diff --git a/urjtag/src/tap/detect.c b/urjtag/src/tap/detect.c index 7575522b..cb867799 100644 --- a/urjtag/src/tap/detect.c +++ b/urjtag/src/tap/detect.c @@ -264,8 +264,9 @@ urj_tap_detect_parts (urj_chain_t *chain, const char *db_path) id->data[0] = 1; did = id; - urj_log (URJ_LOG_LEVEL_NORMAL, _("Device Id: %s (0x%016" PRIX64 ")\n"), - urj_tap_register_get_string (did), urj_tap_register_get_value (did)); + urj_log (URJ_LOG_LEVEL_NORMAL, _("Device Id: %s (0x%0*" PRIX64 ")\n"), + urj_tap_register_get_string (did), did->len / 4, + urj_tap_register_get_value (did)); } else urj_log (URJ_LOG_LEVEL_NORMAL, _("Device Id: unknown as bit 0 was not a 1\n"));