Skip to content

Commit 1f754ac

Browse files
Gibson431kartben
authored andcommitted
settings: fix settings shell subcommand helper
The settings shell returned an unhelpful message when provided the incorrect arguments. This changes the returned message to provide the correct usage message. Signed-off-by: Tim Gibson <[email protected]>
1 parent 0b86664 commit 1f754ac

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

subsys/settings/src/settings_shell.c

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -241,13 +241,7 @@ SHELL_STATIC_SUBCMD_SET_CREATE(settings_cmds,
241241
"Delete a specific setting\n"
242242
"Usage: settings delete <name>",
243243
cmd_delete, 2, 0),
244-
SHELL_SUBCMD_SET_END);
244+
SHELL_SUBCMD_SET_END /* Array terminated. */
245+
);
245246

246-
static int cmd_settings(const struct shell *shell_ptr, size_t argc, char **argv)
247-
{
248-
shell_error(shell_ptr, "%s unknown parameter: %s", argv[0], argv[1]);
249-
return -EINVAL;
250-
}
251-
252-
SHELL_CMD_ARG_REGISTER(settings, &settings_cmds, "Settings shell commands",
253-
cmd_settings, 2, 0);
247+
SHELL_CMD_REGISTER(settings, &settings_cmds, "Settings commands", NULL);

0 commit comments

Comments
 (0)