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-cmd-volume.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'cli/src/cli-cmd-volume.c') diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c index 55044b33..e49b8f23 100644 --- a/cli/src/cli-cmd-volume.c +++ b/cli/src/cli-cmd-volume.c @@ -1194,7 +1194,8 @@ cli_cmd_volume_help_cbk (struct cli_state *state, struct cli_cmd_word *in_word, struct cli_cmd *cmd = NULL; for (cmd = volume_cmds; cmd->pattern; cmd++) - cli_out ("%s - %s", cmd->pattern, cmd->desc); + if (_gf_false == cmd->disable) + cli_out ("%s - %s", cmd->pattern, cmd->desc); return 0; } @@ -1206,8 +1207,8 @@ cli_cmd_volume_register (struct cli_state *state) struct cli_cmd *cmd = NULL; for (cmd = volume_cmds; cmd->pattern; cmd++) { - ret = cli_cmd_register (&state->tree, cmd->pattern, cmd->cbk, - cmd->desc); + + ret = cli_cmd_register (&state->tree, cmd); if (ret) goto out; } -- cgit