summaryrefslogtreecommitdiffstats
path: root/cli/src/cli.h
diff options
context:
space:
mode:
authorKaushik BV <kaushikbv@gluster.com>2011-04-21 06:55:44 +0000
committerAnand Avati <avati@gluster.com>2011-04-22 03:52:24 -0700
commit49603aec03e98a2a38fad66627593b69b6269cbf (patch)
treec779d7f8be2e4477d057f17d49713fdb007639f6 /cli/src/cli.h
parentb5848ed21b9e718011a8f3f3870c4ed978ff17a5 (diff)
cli: changes in struct cli_cmd to disable gluster command at run-time
Signed-off-by: Kaushik BV <kaushikbv@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2744 (make geo-replication package friendly) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2744
Diffstat (limited to 'cli/src/cli.h')
-rw-r--r--cli/src/cli.h6
1 files changed, 4 insertions, 2 deletions
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);