summaryrefslogtreecommitdiffstats
path: root/cli/src/registry.c
diff options
context:
space:
mode:
Diffstat (limited to 'cli/src/registry.c')
-rw-r--r--cli/src/registry.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/cli/src/registry.c b/cli/src/registry.c
index 0ced00787c8..f7e366fd66c 100644
--- a/cli/src/registry.c
+++ b/cli/src/registry.c
@@ -318,7 +318,8 @@ cli_cmd_newword (struct cli_cmd_word *word, const char *token)
int
-cli_cmd_ingest (struct cli_cmd_tree *tree, char **tokens, cli_cmd_cbk_t *cbkfn)
+cli_cmd_ingest (struct cli_cmd_tree *tree, char **tokens, cli_cmd_cbk_t *cbkfn,
+ const char *desc)
{
int ret = 0;
char **tokenp = NULL;
@@ -349,6 +350,7 @@ cli_cmd_ingest (struct cli_cmd_tree *tree, char **tokens, cli_cmd_cbk_t *cbkfn)
}
word->cbkfn = cbkfn;
+ word->desc = desc;
/* end of static strings in command template */
@@ -360,7 +362,7 @@ cli_cmd_ingest (struct cli_cmd_tree *tree, char **tokens, cli_cmd_cbk_t *cbkfn)
int
cli_cmd_register (struct cli_cmd_tree *tree, const char *template,
- cli_cmd_cbk_t cbk)
+ cli_cmd_cbk_t cbk, const char *desc)
{
char **tokens = NULL;
int ret = 0;
@@ -372,7 +374,7 @@ cli_cmd_register (struct cli_cmd_tree *tree, const char *template,
if (!tokens)
return -1;
- ret = cli_cmd_ingest (tree, tokens, cbk);
+ ret = cli_cmd_ingest (tree, tokens, cbk, desc);
if (ret)
goto err;