Change return value on error.
On wrong parameters a error is signalized to the calling function. Change-Id: I484443fdb39938e20382edc9246d5ec546a5c960 Signed-off-by: Mathias K <kesmtp@freenet.de> Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com> Reviewed-on: http://openocd.zylin.com/282 Tested-by: jenkins Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
This commit is contained in:
@@ -284,8 +284,7 @@ COMMAND_HANDLER(handle_oocd_trace_config_command)
|
||||
|
||||
if (CMD_ARGC != 2)
|
||||
{
|
||||
LOG_ERROR("incomplete 'oocd_trace config <target> <tty>' command");
|
||||
return ERROR_FAIL;
|
||||
return ERROR_COMMAND_SYNTAX_ERROR;
|
||||
}
|
||||
|
||||
target = get_current_target(CMD_CTX);
|
||||
@@ -400,7 +399,7 @@ static const struct command_registration oocd_trace_all_command_handlers[] = {
|
||||
.name = "config",
|
||||
.handler = handle_oocd_trace_config_command,
|
||||
.mode = COMMAND_CONFIG,
|
||||
.usage = "target",
|
||||
.usage = "<target> <tty>",
|
||||
},
|
||||
{
|
||||
.name = "status",
|
||||
|
||||
Reference in New Issue
Block a user