summaryrefslogtreecommitdiffstats
path: root/cli/src/cli-cmd-peer.c
diff options
context:
space:
mode:
authorVijay Bellur <vijay@gluster.com>2010-08-17 03:37:46 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-08-17 02:23:59 -0700
commite5737546071bd1d38430503bb64b9998bd7870dd (patch)
treec5a9fe82f2474ff6c8792381c1b77384c9f82983 /cli/src/cli-cmd-peer.c
parentead92558ee8ec71442b2fa2da1a0df197ee78467 (diff)
cli: Implement help command
Signed-off-by: Vijay Bellur <vijay@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1229 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1229
Diffstat (limited to 'cli/src/cli-cmd-peer.c')
-rw-r--r--cli/src/cli-cmd-peer.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/cli/src/cli-cmd-peer.c b/cli/src/cli-cmd-peer.c
index 2959444fe81..b9acd344a43 100644
--- a/cli/src/cli-cmd-peer.c
+++ b/cli/src/cli-cmd-peer.c
@@ -174,15 +174,18 @@ out:
struct cli_cmd cli_probe_cmds[] = {
{ "peer probe <HOSTNAME> [PORT]",
- cli_cmd_peer_probe_cbk },
+ cli_cmd_peer_probe_cbk,
+ "probe peer specified by <HOSTNAME>"},
{ "peer detach <HOSTNAME>",
- cli_cmd_peer_deprobe_cbk },
+ cli_cmd_peer_deprobe_cbk,
+ "detach peer specified by <HOSTNAME>"},
{ "peer status",
- cli_cmd_peer_status_cbk},
+ cli_cmd_peer_status_cbk,
+ "list status of peers"},
- { NULL, NULL }
+ { NULL, NULL, NULL }
};
@@ -193,7 +196,8 @@ cli_cmd_probe_register (struct cli_state *state)
struct cli_cmd *cmd = NULL;
for (cmd = cli_probe_cmds; cmd->pattern; cmd++) {
- ret = cli_cmd_register (&state->tree, cmd->pattern, cmd->cbk);
+ ret = cli_cmd_register (&state->tree, cmd->pattern, cmd->cbk,
+ cmd->desc);
if (ret)
goto out;
}