From 49603aec03e98a2a38fad66627593b69b6269cbf Mon Sep 17 00:00:00 2001 From: Kaushik BV Date: Thu, 21 Apr 2011 06:55:44 +0000 Subject: cli: changes in struct cli_cmd to disable gluster command at run-time Signed-off-by: Kaushik BV Signed-off-by: Anand Avati BUG: 2744 (make geo-replication package friendly) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2744 --- cli/src/cli.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'cli/src/cli.h') diff --git a/cli/src/cli.h b/cli/src/cli.h index f365da70..70d6cfb2 100644 --- a/cli/src/cli.h +++ b/cli/src/cli.h @@ -46,11 +46,14 @@ enum argp_option_keys { struct cli_state; struct cli_cmd_word; struct cli_cmd_tree; +struct cli_cmd; typedef int (cli_cmd_cbk_t)(struct cli_state *state, struct cli_cmd_word *word, const char **words, int wordcount); +typedef void (cli_cmd_reg_cbk_t)( struct cli_cmd *this); + typedef int (cli_cmd_match_t)(struct cli_cmd_word *word); typedef int (cli_cmd_filler_t)(struct cli_cmd_word *word); @@ -147,8 +150,7 @@ typedef ssize_t (*cli_serialize_t) (struct iovec outmsg, void *args); extern struct cli_state *global_state; /* use only in readline callback */ -int cli_cmd_register (struct cli_cmd_tree *tree, const char *template, - cli_cmd_cbk_t cbk, const char *desc); +int cli_cmd_register (struct cli_cmd_tree *tree, struct cli_cmd *cmd); int cli_cmds_register (struct cli_state *state); int cli_input_init (struct cli_state *state); -- cgit