|
From: openocd-gerrit <ope...@us...> - 2024-02-11 23:08:17
|
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 81a50d3e9050eed8f4d95622f2b326054a200b93 (commit)
from d0548940f289fbb6c3ce61106799aa56ec20f188 (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 81a50d3e9050eed8f4d95622f2b326054a200b93
Author: Antonio Borneo <bor...@gm...>
Date: Thu Feb 1 10:55:51 2024 +0100
jtag: fix jtag configure command containing events
Commit ea2e26f7d521 ("jtag: rewrite jim_jtag_configure() as
COMMAND_HANDLER") breaks the option -event if it is the last of
the command line.
This can be tested, even without any device connected, through:
#> openocd -f board/ti_cc26x0_launchpad.cfg
wrong # args: should be "-event <event-name> <event-body>"
Fix the check on available arguments after -event.
Change-Id: Iec1522238f906d61a888a09a7685acd9ac6442a7
Signed-off-by: Antonio Borneo <bor...@gm...>
Reported-by: Lorenz Brun <lo...@br...>
Fixes: ea2e26f7d521 ("jtag: rewrite jim_jtag_configure() as COMMAND_HANDLER")
Reviewed-on: https://review.openocd.org/c/openocd/+/8125
Tested-by: jenkins
Reviewed-by: Lorenz Brun <lo...@br...>
diff --git a/src/jtag/tcl.c b/src/jtag/tcl.c
index 163edfa19..799552901 100644
--- a/src/jtag/tcl.c
+++ b/src/jtag/tcl.c
@@ -315,7 +315,7 @@ __COMMAND_HANDLER(handle_jtag_configure)
const struct nvp *n = nvp_name2value(nvp_config_opts, CMD_ARGV[i]);
switch (n->value) {
case JCFG_EVENT:
- if (i + (is_configure ? 3 : 2) >= CMD_ARGC) {
+ if (i + (is_configure ? 2 : 1) >= CMD_ARGC) {
command_print(CMD, "wrong # args: should be \"-event <event-name>%s\"",
is_configure ? " <event-body>" : "");
return ERROR_COMMAND_ARGUMENT_INVALID;
-----------------------------------------------------------------------
Summary of changes:
src/jtag/tcl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
hooks/post-receive
--
Main OpenOCD repository
|