From 77d82df9d5e0047b0f1779130c4031cf3ce8ae1b Mon Sep 17 00:00:00 2001 From: Rahul Date: Tue, 22 Feb 2011 04:13:14 +0000 Subject: Display correct usage of rebalance command when it is wrongly entered. Signed-off-by: Rahul Signed-off-by: Anand V. Avati BUG: 1922 (Volume not present wrong message displayed on command line) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1922 --- cli/src/cli-cmd-volume.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c index a790b326e83..8414a50b69c 100644 --- a/cli/src/cli-cmd-volume.c +++ b/cli/src/cli-cmd-volume.c @@ -482,6 +482,13 @@ cli_cmd_volume_defrag_cbk (struct cli_state *state, struct cli_cmd_word *word, goto out; } + if (strcmp (words[3], "start") && strcmp (words[3], "stop") && + strcmp (words[3], "status")) { + cli_usage_out (word->pattern); + parse_error = 1; + goto out; + } + ret = dict_set_str (dict, "volname", (char *)words[2]); if (ret) goto out; -- cgit