From: openocd-gerrit <ope...@us...> - 2023-10-07 14:44:32
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 2f17449dff3272e08f509e0f06aa08d3acf7e105 (commit) from d20304b3fb0f27f62844144837ee5b99ee040bcd (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 2f17449dff3272e08f509e0f06aa08d3acf7e105 Author: Parshintsev Anatoly <ana...@sy...> Date: Tue Sep 5 21:08:02 2023 +0300 target: return error if attempting to access non-existing registers Change-Id: Ic22edcab46d21dbc71f78275a78bdea9c2bcc394 Signed-off-by: Parshintsev Anatoly <ana...@sy...> Reviewed-on: https://review.openocd.org/c/openocd/+/7886 Reviewed-by: Tim Newsome <ti...@si...> Reviewed-by: Jan Matyas <jan...@co...> Reviewed-by: Marek Vrbka <mar...@co...> Reviewed-by: Antonio Borneo <bor...@gm...> Tested-by: jenkins diff --git a/src/target/target.c b/src/target/target.c index 121974375..acd351a66 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -3116,7 +3116,7 @@ COMMAND_HANDLER(handle_reg_command) if (!reg) { command_print(CMD, "%i is out of bounds, the current target " "has only %i registers (0 - %i)", num, count, count - 1); - return ERROR_OK; + return ERROR_FAIL; } } else { /* access a single register by its name */ @@ -3175,7 +3175,7 @@ COMMAND_HANDLER(handle_reg_command) not_found: command_print(CMD, "register %s not found in current target", CMD_ARGV[0]); - return ERROR_OK; + return ERROR_FAIL; } COMMAND_HANDLER(handle_poll_command) ----------------------------------------------------------------------- Summary of changes: src/target/target.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- Main OpenOCD repository |