summaryrefslogtreecommitdiffstats
path: root/cli
diff options
context:
space:
mode:
authorPranith Kumar K <pranithk@gluster.com>2010-09-06 08:02:08 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-09-06 09:37:48 -0700
commite807464de55fc366907c5bc8e3cf84b11da19e46 (patch)
tree9667a54e1ce8d79e0b702d7726f7327df5621e15 /cli
parentf0e6630fb33ba69c85e267848290389d60f25d21 (diff)
cli: print volume info cmd usage in case of parse errors
Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1533 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1533
Diffstat (limited to 'cli')
-rw-r--r--cli/src/cli-cmd-volume.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c
index 09f89137445..fdd58c69af0 100644
--- a/cli/src/cli-cmd-volume.c
+++ b/cli/src/cli-cmd-volume.c
@@ -65,6 +65,12 @@ cli_cmd_volume_delete_usage ()
cli_out ("Usage: volume delete <VOLNAME>");
}
+void
+cli_cmd_volume_info_usage ()
+{
+ cli_out ("Usage: volume info [all|<VOLNAME>]");
+}
+
int
cli_cmd_volume_info_cbk (struct cli_state *state, struct cli_cmd_word *word,
const char **words, int wordcount)
@@ -93,6 +99,9 @@ cli_cmd_volume_info_cbk (struct cli_state *state, struct cli_cmd_word *word,
goto out;
}
proc = &cli_rpc_prog->proctable[GF1_CLI_GET_VOLUME];
+ } else {
+ cli_cmd_volume_info_usage ();
+ return -1;
}
local = cli_local_get ();