subsys: shell: add int ret_val to command handlers

1. Command handler can return command exectution status as int.
2. Existing command handlers rework.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
This commit is contained in:
Jakub Rzeszutko 2018-10-01 22:08:59 +02:00 committed by Carles Cufí
commit 0eea1ef212
13 changed files with 564 additions and 372 deletions

View file

@ -74,8 +74,8 @@ struct shell;
/**
* @brief Shell command handler prototype.
*/
typedef void (*shell_cmd_handler)(const struct shell *shell,
size_t argc, char **argv);
typedef int (*shell_cmd_handler)(const struct shell *shell,
size_t argc, char **argv);
/*
* @brief Shell static command descriptor.