From ba79d503bb4f1e92e91a4c300a036819fe91c6d3 Mon Sep 17 00:00:00 2001 From: Marc Schink Date: Mon, 6 Nov 2023 16:22:53 +0100 Subject: [PATCH] jtag/drivers/cmsis-dap: Return error in 'backend' command Change-Id: Ib9bf7ab50cbe193e9e726efb3cb58e53723a6dd1 Signed-off-by: Marc Schink Reviewed-on: https://review.openocd.org/c/openocd/+/7964 Reviewed-by: Tomas Vanek Tested-by: jenkins Reviewed-by: Antonio Borneo --- src/jtag/drivers/cmsis_dap.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/jtag/drivers/cmsis_dap.c b/src/jtag/drivers/cmsis_dap.c index 52e4fadeb9..03832431dd 100644 --- a/src/jtag/drivers/cmsis_dap.c +++ b/src/jtag/drivers/cmsis_dap.c @@ -2148,10 +2148,11 @@ COMMAND_HANDLER(cmsis_dap_handle_backend_command) } } - LOG_ERROR("invalid backend argument to cmsis-dap backend "); + command_print(CMD, "invalid backend argument to cmsis-dap backend "); + return ERROR_COMMAND_ARGUMENT_INVALID; } } else { - LOG_ERROR("expected exactly one argument to cmsis-dap backend "); + return ERROR_COMMAND_SYNTAX_ERROR; } return ERROR_OK;