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 ac6972ba16b471cb46a2d862fb24d54b98b4bb61 (commit)
from 171454fffad3573bdf0870769ae7d82bf07bb8dc (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 ac6972ba16b471cb46a2d862fb24d54b98b4bb61
Author: Marc Schink <de...@za...>
Date: Tue Nov 11 17:39:23 2025 +0100
adapter/gpio: Use command_print() instead of LOG_ERROR()
Use command_print() in order to provide an error message to the caller.
While at it, fix the return values.
Change-Id: I0f8d3466ab2729d8cca6cf4c1cff51d67982c373
Signed-off-by: Marc Schink <de...@za...>
Reviewed-on: https://review.openocd.org/c/openocd/+/9267
Tested-by: jenkins
Reviewed-by: Antonio Borneo <bor...@gm...>
diff --git a/src/jtag/adapter.c b/src/jtag/adapter.c
index c30a26c87..3f94ffec7 100644
--- a/src/jtag/adapter.c
+++ b/src/jtag/adapter.c
@@ -957,8 +957,8 @@ COMMAND_HANDLER(adapter_gpio_config_handler)
int gpio_idx = get_gpio_index(CMD_ARGV[0]);
if (gpio_idx == -1) {
- LOG_ERROR("adapter has no gpio named %s", CMD_ARGV[0]);
- return ERROR_COMMAND_SYNTAX_ERROR;
+ command_print(CMD, "adapter has no gpio named %s", CMD_ARGV[0]);
+ return ERROR_COMMAND_ARGUMENT_INVALID;
}
if (CMD_ARGC == 1) {
@@ -1077,9 +1077,9 @@ COMMAND_HANDLER(adapter_gpio_config_handler)
}
}
- LOG_ERROR("illegal option for adapter %s %s: %s",
+ command_print(CMD, "illegal option for adapter %s %s: %s",
CMD_NAME, gpio_map[gpio_idx].name, CMD_ARGV[i]);
- return ERROR_COMMAND_SYNTAX_ERROR;
+ return ERROR_COMMAND_ARGUMENT_INVALID;
}
/* Force swdio_dir init state to be compatible with swdio init state */
-----------------------------------------------------------------------
Summary of changes:
src/jtag/adapter.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|