shell: correct build-in commands definition
The definition of the help command has been changed so that it does not accept the arguments. Thanks to this it cannot be marked by the "select" command. Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordisemi.no>
This commit is contained in:
parent
5aaac4b72e
commit
b83e4224e0
3 changed files with 4 additions and 5 deletions
|
@ -458,8 +458,7 @@ SHELL_STATIC_SUBCMD_SET_CREATE(m_sub_resize,
|
||||||
|
|
||||||
SHELL_CMD_ARG_REGISTER(clear, NULL, SHELL_HELP_CLEAR, cmd_clear, 1, 0);
|
SHELL_CMD_ARG_REGISTER(clear, NULL, SHELL_HELP_CLEAR, cmd_clear, 1, 0);
|
||||||
SHELL_CMD_REGISTER(shell, &m_sub_shell, SHELL_HELP_SHELL, NULL);
|
SHELL_CMD_REGISTER(shell, &m_sub_shell, SHELL_HELP_SHELL, NULL);
|
||||||
SHELL_CMD_ARG_REGISTER(help, NULL, SHELL_HELP_HELP, cmd_help,
|
SHELL_CMD_ARG_REGISTER(help, NULL, SHELL_HELP_HELP, cmd_help, 1, 0);
|
||||||
1, SHELL_OPT_ARG_CHECK_SKIP);
|
|
||||||
SHELL_COND_CMD_ARG_REGISTER(CONFIG_SHELL_HISTORY, history, NULL,
|
SHELL_COND_CMD_ARG_REGISTER(CONFIG_SHELL_HISTORY, history, NULL,
|
||||||
SHELL_HELP_HISTORY, cmd_history, 1, 0);
|
SHELL_HELP_HISTORY, cmd_history, 1, 0);
|
||||||
SHELL_COND_CMD_ARG_REGISTER(CONFIG_SHELL_CMDS_RESIZE, resize, &m_sub_resize,
|
SHELL_COND_CMD_ARG_REGISTER(CONFIG_SHELL_CMDS_RESIZE, resize, &m_sub_resize,
|
||||||
|
|
|
@ -38,8 +38,8 @@ static void test_cmd_help(void)
|
||||||
test_shell_execute_cmd("help", 0);
|
test_shell_execute_cmd("help", 0);
|
||||||
test_shell_execute_cmd("help -h", 1);
|
test_shell_execute_cmd("help -h", 1);
|
||||||
test_shell_execute_cmd("help --help", 1);
|
test_shell_execute_cmd("help --help", 1);
|
||||||
test_shell_execute_cmd("help dummy", 0);
|
test_shell_execute_cmd("help dummy", -EINVAL);
|
||||||
test_shell_execute_cmd("help dummy dummy", 0);
|
test_shell_execute_cmd("help dummy dummy", -EINVAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_cmd_clear(void)
|
static void test_cmd_clear(void)
|
||||||
|
|
|
@ -30,7 +30,7 @@ void test_fs_help(void)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_FILE_SYSTEM_SHELL
|
#ifdef CONFIG_FILE_SYSTEM_SHELL
|
||||||
test_shell_exec("help", 0);
|
test_shell_exec("help", 0);
|
||||||
test_shell_exec("help fs", 0);
|
test_shell_exec("help fs", -EINVAL);
|
||||||
test_shell_exec("fs mount fat", -EINVAL);
|
test_shell_exec("fs mount fat", -EINVAL);
|
||||||
test_shell_exec("fs mount littlefs", -EINVAL);
|
test_shell_exec("fs mount littlefs", -EINVAL);
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue