summaryrefslogtreecommitdiffstats
path: root/cli/src/cli-cmd-peer.c
diff options
context:
space:
mode:
authorN Balachandran <nbalacha@redhat.com>2017-11-06 09:30:54 +0530
committerjiffin tony Thottan <jthottan@redhat.com>2017-11-08 06:14:38 +0000
commit3654ddc269a366d786cdef2a799a8b95025f1c8a (patch)
tree9b5e2a29cbbba44915491afe885ada460af3b58c /cli/src/cli-cmd-peer.c
parent1a1bdfbffc81981a80af40ebf000194d9bcd1bf0 (diff)
cli: gluster help changes
gluster cli help now shows only the top level help commands. gluster <component> help will now show help commands for <component>. Change-Id: I263f53a0870d80ef4cfaad455fdaa47e2ac4423b BUG: 1509786 > BUG: 1474768 > Signed-off-by: N Balachandran <nbalacha@redhat.com> (cherry picked from commit 89dc54f50c9f800ca4446ea8fe736e4860588845) Signed-off-by: N Balachandran <nbalacha@redhat.com>
Diffstat (limited to 'cli/src/cli-cmd-peer.c')
-rw-r--r--cli/src/cli-cmd-peer.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/cli/src/cli-cmd-peer.c b/cli/src/cli-cmd-peer.c
index 4802f71eca8..7df60bcb2be 100644
--- a/cli/src/cli-cmd-peer.c
+++ b/cli/src/cli-cmd-peer.c
@@ -264,7 +264,7 @@ struct cli_cmd cli_probe_cmds[] = {
{ "peer help",
cli_cmd_peer_help_cbk,
- "Help command for peer "},
+ "display help for peer commands"},
{ "pool list",
cli_cmd_pool_list_cbk,
@@ -281,17 +281,20 @@ cli_cmd_peer_help_cbk (struct cli_state *state, struct cli_cmd_word *in_word,
struct cli_cmd *probe_cmd = NULL;
int count = 0;
+ cli_out ("\ngluster peer commands");
+ cli_out ("======================\n");
+
cmd = GF_CALLOC (1, sizeof (cli_probe_cmds), cli_mt_cli_cmd);
memcpy (cmd, cli_probe_cmds, sizeof (cli_probe_cmds));
count = (sizeof (cli_probe_cmds) / sizeof (struct cli_cmd));
cli_cmd_sort (cmd, count);
-
-
for (probe_cmd = cmd; probe_cmd->pattern; probe_cmd++)
cli_out ("%s - %s", probe_cmd->pattern, probe_cmd->desc);
GF_FREE (cmd);
+
+ cli_out ("\n");
return 0;
}