target: Examine subsequent targets after failure

When a target examination fails, continue to examine subsequent targets.
Return the number of targets that failed to examine.

Change-Id: I883a0c445edc7eb00f496b79271d773771ec6b66
Signed-off-by: Kevin Yang <kangyang@google.com>
Reviewed-on: http://openocd.zylin.com/5855
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
Kevin Yang 2020-10-12 15:33:47 -07:00 committed by Antonio Borneo
parent 73746d78b7
commit 92ea7e41b9
1 changed files with 5 additions and 3 deletions

View File

@ -766,9 +766,11 @@ int target_examine(void)
if (target->defer_examine)
continue;
retval = target_examine_one(target);
if (retval != ERROR_OK)
return retval;
int retval2 = target_examine_one(target);
if (retval2 != ERROR_OK) {
LOG_WARNING("target %s examination failed", target_name(target));
retval = retval2;
}
}
return retval;
}