From e807464de55fc366907c5bc8e3cf84b11da19e46 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Mon, 6 Sep 2010 08:02:08 +0000 Subject: cli: print volume info cmd usage in case of parse errors Signed-off-by: Pranith Kumar K Signed-off-by: Vijay Bellur BUG: 1533 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1533 --- cli/src/cli-cmd-volume.c | 9 +++++++++ 1 file changed, 9 insertions(+) (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 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 "); } +void +cli_cmd_volume_info_usage () +{ + cli_out ("Usage: volume info [all|]"); +} + 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 (); -- cgit