Skip to content

Commit 6d13942

Browse files
committed
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 <[email protected]> Reviewed-on: https://review.openocd.org/c/openocd/+/8802 Tested-by: jenkins
1 parent 72ff2e2 commit 6d13942

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/helper/command.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,7 @@ COMMAND_HANDLER(handle_echo)
673673
}
674674

675675
if (CMD_ARGC != 1)
676-
return ERROR_FAIL;
676+
return ERROR_COMMAND_SYNTAX_ERROR;
677677

678678
LOG_USER("%s", CMD_ARGV[0]);
679679
return ERROR_OK;

0 commit comments

Comments
 (0)