diff --git a/urjtag/ChangeLog b/urjtag/ChangeLog index c6dcf330..4810795d 100644 --- a/urjtag/ChangeLog +++ b/urjtag/ChangeLog @@ -1,3 +1,9 @@ +2010-02-02 Mike Frysinger + + * src/tap/detect.c (urj_tap_detect_parts): Include bit/hex output in the + different messages so people don't have to manually pick apart the idcode + to add support for new parts. + 2010-02-02 Jie Zhang * src/bus/bf518f_ezbrd.c: New file. diff --git a/urjtag/src/tap/detect.c b/urjtag/src/tap/detect.c index 9392f065..53432b27 100644 --- a/urjtag/src/tap/detect.c +++ b/urjtag/src/tap/detect.c @@ -64,7 +64,7 @@ find_record (char *filename, urj_tap_register_t *key, struct id_record *idr) { urj_log (URJ_LOG_LEVEL_ERROR, _("Unable to open file '%s'\n"), filename); urj_error_IO_set ("Unable to open file '%s'", filename); - return 0; + return r; } tr = urj_tap_register_alloc (key->len); @@ -300,14 +300,18 @@ urj_tap_detect_parts (urj_chain_t *chain, const char *db_path) memcpy (key->data, &id->data[1], key->len); if (!find_record (data_path, key, &idr)) { - urj_log (URJ_LOG_LEVEL_NORMAL, _(" Unknown manufacturer!\n")); + urj_log (URJ_LOG_LEVEL_NORMAL, " %s (%s)\n", + _("Unknown manufacturer!"), + urj_tap_register_get_string (key)); urj_tap_register_free (key); continue; } + + urj_log (URJ_LOG_LEVEL_NORMAL, " %12s: %s (0x%03"PRIX64")\n", + _("Manufacturer"), idr.fullname, + (urj_tap_register_get_value (key) << 1) | 1); urj_tap_register_free (key); - urj_log (URJ_LOG_LEVEL_NORMAL, _(" Manufacturer: %s\n"), - idr.fullname); if (strlen (idr.fullname) > URJ_PART_MANUFACTURER_MAXLEN) urj_warning (_("Manufacturer too long\n")); manufacturer[0] = '\0'; @@ -326,14 +330,18 @@ urj_tap_detect_parts (urj_chain_t *chain, const char *db_path) memcpy (key->data, &id->data[12], key->len); if (!find_record (data_path, key, &idr)) { - urj_log (URJ_LOG_LEVEL_NORMAL, _(" Unknown part!\n")); + urj_log (URJ_LOG_LEVEL_NORMAL, " %s (%s)\n", + _("Unknown part!"), + urj_tap_register_get_string (key)); urj_tap_register_free (key); continue; } + + urj_log (URJ_LOG_LEVEL_NORMAL, _(" Part(%d): %s (0x%03"PRIX64")\n"), + chain->active_part, idr.fullname, + urj_tap_register_get_value (key)); urj_tap_register_free (key); - urj_log (URJ_LOG_LEVEL_NORMAL, _(" Part(%d): %s\n"), - chain->active_part, idr.fullname); if (strlen (idr.fullname) > URJ_PART_PART_MAXLEN) urj_warning (_("Part too long\n")); partname[0] ='\0'; @@ -352,7 +360,9 @@ urj_tap_detect_parts (urj_chain_t *chain, const char *db_path) memcpy (key->data, &id->data[28], key->len); if (!find_record (data_path, key, &idr)) { - urj_log (URJ_LOG_LEVEL_NORMAL, _(" Unknown stepping!\n")); + urj_log (URJ_LOG_LEVEL_NORMAL, " %s (%s)\n", + _("Unknown stepping!"), + urj_tap_register_get_string (key)); urj_tap_register_free (key); continue; }