From 4297209ac91d62ab509284c142273ec38ec8cfe3 Mon Sep 17 00:00:00 2001 From: dbrownell Date: Tue, 29 Sep 2009 18:26:18 +0000 Subject: Make "-expected-id 0" suppress warnings; not unlike it used to do. git-svn-id: svn://svn.berlios.de/openocd/trunk@2775 b42882b7-edfa-0310-969c-e2dbd0fdcd60 --- src/jtag/core.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/jtag/core.c b/src/jtag/core.c index 78f67db3..056fa990 100644 --- a/src/jtag/core.c +++ b/src/jtag/core.c @@ -959,10 +959,14 @@ static bool jtag_examine_chain_match_tap(const struct jtag_tap_s *tap) { if (tap->idcode == tap->expected_ids[ii]) return true; + + /* treat "-expected-id 0" as a "don't-warn" wildcard */ + if (0 == tap->expected_ids[ii]) + return true; } - /* If none of the expected ids matched, log an error */ - jtag_examine_chain_display(LOG_LVL_ERROR, "UNEXPECTED", + /* If none of the expected ids matched, warn */ + jtag_examine_chain_display(LOG_LVL_WARNING, "UNEXPECTED", tap->dotted_name, tap->idcode); for (ii = 0; ii < tap->expected_ids_cnt; ii++) { @@ -1025,7 +1029,7 @@ static int jtag_examine_chain(void) } tap->idcode = idcode; - // ensure the TAP ID does matches what was expected + /* ensure the TAP ID matches what was expected */ if (!jtag_examine_chain_match_tap(tap)) return ERROR_JTAG_INIT_FAILED; } -- cgit v1.2.3