Use command_print() in order to provide an error message to the caller.
Change-Id: I9f1a2ef07a102e1d6e755f3680bed0f7183b5c9c
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8968
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
}
if (!is_arm_mode(arm->core_mode)) {
- LOG_ERROR("not a valid arm core mode - communication failure?");
+ command_print(CMD, "not a valid arm core mode - communication failure?");
return ERROR_FAIL;
}
struct target *target = get_current_target(CMD_CTX);
if (!target) {
- LOG_ERROR("No target selected");
+ command_print(CMD, "No target selected");
return ERROR_FAIL;
}