shell: internal api update: help module

Add prefix z_ to internal functions printing help.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
This commit is contained in:
Jakub Rzeszutko 2020-12-06 11:45:42 +01:00 committed by Carles Cufí
commit fb6155a242
3 changed files with 15 additions and 14 deletions

View file

@ -49,9 +49,9 @@ static void shell_internal_help_print(const struct shell *shell)
return;
}
shell_help_cmd_print(shell, &shell->ctx->active_cmd);
shell_help_subcmd_print(shell, &shell->ctx->active_cmd,
"Subcommands:\n");
z_shell_help_cmd_print(shell, &shell->ctx->active_cmd);
z_shell_help_subcmd_print(shell, &shell->ctx->active_cmd,
"Subcommands:\n");
}
/**
@ -1586,7 +1586,8 @@ static int cmd_help(const struct shell *shell, size_t argc, char **argv)
if (IS_ENABLED(CONFIG_SHELL_HELP)) {
/* For NULL argument function will print all root commands */
shell_help_subcmd_print(shell, NULL, "\nAvailable commands:\n");
z_shell_help_subcmd_print(shell, NULL,
"\nAvailable commands:\n");
} else {
const struct shell_static_entry *entry;
size_t idx = 0;

View file

@ -145,9 +145,9 @@ static void help_item_print(const struct shell *shell, const char *item_name,
/* Function prints all subcommands of the parent command together with their
* help string
*/
void shell_help_subcmd_print(const struct shell *shell,
const struct shell_static_entry *parent,
const char *description)
void z_shell_help_subcmd_print(const struct shell *shell,
const struct shell_static_entry *parent,
const char *description)
{
const struct shell_static_entry *entry = NULL;
struct shell_static_entry dloc;
@ -176,8 +176,8 @@ void shell_help_subcmd_print(const struct shell *shell,
}
}
void shell_help_cmd_print(const struct shell *shell,
const struct shell_static_entry *cmd)
void z_shell_help_cmd_print(const struct shell *shell,
const struct shell_static_entry *cmd)
{
static const char cmd_sep[] = " - "; /* commands separator */
uint16_t field_width;

View file

@ -14,13 +14,13 @@ extern "C" {
#endif
/* Function is printing command help string. */
void shell_help_cmd_print(const struct shell *shell,
const struct shell_static_entry *cmd);
void z_shell_help_cmd_print(const struct shell *shell,
const struct shell_static_entry *cmd);
/* Function is printing subcommands and help string. */
void shell_help_subcmd_print(const struct shell *shell,
const struct shell_static_entry *cmd,
const char *description);
void z_shell_help_subcmd_print(const struct shell *shell,
const struct shell_static_entry *cmd,
const char *description);
/**
* @}