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:
parent
460995c810
commit
fb6155a242
3 changed files with 15 additions and 14 deletions
|
@ -49,9 +49,9 @@ static void shell_internal_help_print(const struct shell *shell)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
shell_help_cmd_print(shell, &shell->ctx->active_cmd);
|
z_shell_help_cmd_print(shell, &shell->ctx->active_cmd);
|
||||||
shell_help_subcmd_print(shell, &shell->ctx->active_cmd,
|
z_shell_help_subcmd_print(shell, &shell->ctx->active_cmd,
|
||||||
"Subcommands:\n");
|
"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)) {
|
if (IS_ENABLED(CONFIG_SHELL_HELP)) {
|
||||||
/* For NULL argument function will print all root commands */
|
/* 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 {
|
} else {
|
||||||
const struct shell_static_entry *entry;
|
const struct shell_static_entry *entry;
|
||||||
size_t idx = 0;
|
size_t idx = 0;
|
||||||
|
|
|
@ -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
|
/* Function prints all subcommands of the parent command together with their
|
||||||
* help string
|
* help string
|
||||||
*/
|
*/
|
||||||
void shell_help_subcmd_print(const struct shell *shell,
|
void z_shell_help_subcmd_print(const struct shell *shell,
|
||||||
const struct shell_static_entry *parent,
|
const struct shell_static_entry *parent,
|
||||||
const char *description)
|
const char *description)
|
||||||
{
|
{
|
||||||
const struct shell_static_entry *entry = NULL;
|
const struct shell_static_entry *entry = NULL;
|
||||||
struct shell_static_entry dloc;
|
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,
|
void z_shell_help_cmd_print(const struct shell *shell,
|
||||||
const struct shell_static_entry *cmd)
|
const struct shell_static_entry *cmd)
|
||||||
{
|
{
|
||||||
static const char cmd_sep[] = " - "; /* commands separator */
|
static const char cmd_sep[] = " - "; /* commands separator */
|
||||||
uint16_t field_width;
|
uint16_t field_width;
|
||||||
|
|
|
@ -14,13 +14,13 @@ extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Function is printing command help string. */
|
/* Function is printing command help string. */
|
||||||
void shell_help_cmd_print(const struct shell *shell,
|
void z_shell_help_cmd_print(const struct shell *shell,
|
||||||
const struct shell_static_entry *cmd);
|
const struct shell_static_entry *cmd);
|
||||||
|
|
||||||
/* Function is printing subcommands and help string. */
|
/* Function is printing subcommands and help string. */
|
||||||
void shell_help_subcmd_print(const struct shell *shell,
|
void z_shell_help_subcmd_print(const struct shell *shell,
|
||||||
const struct shell_static_entry *cmd,
|
const struct shell_static_entry *cmd,
|
||||||
const char *description);
|
const char *description);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue