Skip to content

Commit

Permalink
Bluetooth: shell: make behaviour of iso cmd same as bt cmd
Browse files Browse the repository at this point in the history
When no parameters are given to the 'bt' command it prints
the help message. The 'iso' command responds with 'missing
subcommand'. This commit updates the behaviour of the iso
command so that it behaves the same as the bt command, i.e.
prints a help message

Signed-off-by: Andries Kruithof <[email protected]>
  • Loading branch information
kruithofa committed Oct 25, 2023
1 parent 357d6ce commit 877bee2
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions subsys/bluetooth/shell/iso.c
Original file line number Diff line number Diff line change
Expand Up @@ -967,14 +967,15 @@ SHELL_STATIC_SUBCMD_SET_CREATE(iso_cmds,

static int cmd_iso(const struct shell *sh, size_t argc, char **argv)
{
if (argc > 1) {
shell_error(sh, "%s unknown parameter: %s",
argv[0], argv[1]);
} else {
shell_error(sh, "%s Missing subcommand", argv[0]);
if (argc == 1) {
shell_help(sh);

return SHELL_CMD_HELP_PRINTED;
}

return -ENOEXEC;
shell_error(sh, "%s unknown parameter: %s", argv[0], argv[1]);

return -EINVAL;
}

SHELL_CMD_ARG_REGISTER(iso, &iso_cmds, "Bluetooth ISO shell commands",
Expand Down

0 comments on commit 877bee2

Please sign in to comment.