From 36ae62ada88b8477994d17527868370a4634999e Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Wed, 25 Aug 2010 01:32:52 +0000 Subject: cli: print volume create command usage in-case of parse errors Signed-off-by: Pranith Kumar K Signed-off-by: Anand V. Avati BUG: 1263 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1263 --- cli/src/cli-cmd-volume.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'cli') diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c index fddcc213f00..ae2b6b2aaae 100644 --- a/cli/src/cli-cmd-volume.c +++ b/cli/src/cli-cmd-volume.c @@ -67,6 +67,12 @@ out: } +void +cli_cmd_volume_create_usage () +{ + cli_out ("usage: volume create " + "[stripe ] [replica ] ..."); +} int cli_cmd_volume_create_cbk (struct cli_state *state, struct cli_cmd_word *word, @@ -86,7 +92,8 @@ cli_cmd_volume_create_cbk (struct cli_state *state, struct cli_cmd_word *word, ret = cli_cmd_volume_create_parse (words, wordcount, &options); if (ret) { - cli_out ("Command Parsing Failed"); + printf ("Command Parsing failed, "); + cli_cmd_volume_create_usage (); goto out; } -- cgit