jtag/drivers/cmsis-dap: Return error in 'backend' command

Change-Id: Ib9bf7ab50cbe193e9e726efb3cb58e53723a6dd1
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/7964
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
Marc Schink 2023-11-06 16:22:53 +01:00 committed by Antonio Borneo
parent b25e5322ee
commit ba79d503bb
1 changed files with 3 additions and 2 deletions

View File

@ -2148,10 +2148,11 @@ COMMAND_HANDLER(cmsis_dap_handle_backend_command)
}
}
LOG_ERROR("invalid backend argument to cmsis-dap backend <backend>");
command_print(CMD, "invalid backend argument to cmsis-dap backend <backend>");
return ERROR_COMMAND_ARGUMENT_INVALID;
}
} else {
LOG_ERROR("expected exactly one argument to cmsis-dap backend <backend>");
return ERROR_COMMAND_SYNTAX_ERROR;
}
return ERROR_OK;