This is an automated email from Gerrit. "zapb <[email protected]>" just uploaded a new patch set to Gerrit, which you can find at https://review.openocd.org/c/openocd/+/9267
-- gerrit commit 0cdc9de8c1dc1cf916d094f86ec76d032db9f45f Author: Marc Schink <[email protected]> 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 <[email protected]> diff --git a/src/jtag/adapter.c b/src/jtag/adapter.c index c30a26c87b..3f94ffec7f 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 */ --
