subsys: shell: Print help message only if command doesn't available
Fixes: #11250 Signed-off-by: qianfan Zhao <qianfanguijin@163.com>
This commit is contained in:
parent
42a7c43a2a
commit
e3506832a4
1 changed files with 3 additions and 2 deletions
|
@ -956,9 +956,10 @@ static int exec_cmd(const struct shell *shell, size_t argc, char **argv)
|
|||
} else {
|
||||
shell_fprintf(shell, SHELL_ERROR,
|
||||
SHELL_MSG_SPECIFY_SUBCOMMAND);
|
||||
ret_val = -ENOEXEC;
|
||||
goto clear;
|
||||
}
|
||||
|
||||
ret_val = -ENOEXEC;
|
||||
goto clear;
|
||||
}
|
||||
|
||||
if (shell->ctx->active_cmd.args) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue