From: openocd-gerrit <ope...@us...> - 2025-05-09 12:13:02
|
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 f42540cc90b874c7662c59b8e4ebef3f657717ad (commit) from 8c09cc2c17547dca9783b596d43b735520f2e936 (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 f42540cc90b874c7662c59b8e4ebef3f657717ad Author: Evgeniy Naydanov <evg...@sy...> Date: Mon Apr 28 16:55:35 2025 +0300 target: improve error reporting for `-event` option `target create` calls can get quite long and an indication what is the option that caused the error can be helpful. Also, there can be multiple `-event` options for different events, therefore indicating which one is it is also helpful. Change-Id: I5ea61437ca9705e790ed8343183883a3fdfebc80 Signed-off-by: Evgeniy Naydanov <evg...@sy...> Reviewed-on: https://review.openocd.org/c/openocd/+/8861 Reviewed-by: Tomas Vanek <va...@fb...> Reviewed-by: Antonio Borneo <bor...@gm...> Tested-by: jenkins diff --git a/src/target/target.c b/src/target/target.c index 6d2fc9506..6653c381c 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -4926,7 +4926,8 @@ static COMMAND_HELPER(target_configure, struct target *target, unsigned int inde case TCFG_EVENT: if (index == CMD_ARGC) { - command_print(CMD, "missing event-name"); + command_print(CMD, "expecting %s event-name event-body", + CMD_ARGV[index - 1]); return ERROR_COMMAND_ARGUMENT_INVALID; } @@ -4939,7 +4940,8 @@ static COMMAND_HELPER(target_configure, struct target *target, unsigned int inde if (is_configure) { if (index == CMD_ARGC) { - command_print(CMD, "missing event-body"); + command_print(CMD, "expecting %s %s event-body", + CMD_ARGV[index - 2], CMD_ARGV[index - 1]); return ERROR_COMMAND_ARGUMENT_INVALID; } } ----------------------------------------------------------------------- Summary of changes: src/target/target.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) hooks/post-receive -- Main OpenOCD repository |