helper: command: return correct error on command 'echo'
In case of incorrect syntax, return ERROR_COMMAND_SYNTAX_ERROR so the command framework will print the usage string. Change-Id: I348debc77f470551d54fa77b4da780a48ff539c0 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8802 Tested-by: jenkins
This commit is contained in:
@@ -673,7 +673,7 @@ COMMAND_HANDLER(handle_echo)
|
||||
}
|
||||
|
||||
if (CMD_ARGC != 1)
|
||||
return ERROR_FAIL;
|
||||
return ERROR_COMMAND_SYNTAX_ERROR;
|
||||
|
||||
LOG_USER("%s", CMD_ARGV[0]);
|
||||
return ERROR_OK;
|
||||
|
||||
Reference in New Issue
Block a user