summaryrefslogtreecommitdiffstats
path: root/cli/src/cli-cmd-parser.c
diff options
context:
space:
mode:
authorKaushik BV <kaushikbv@gluster.com>2011-07-12 05:33:29 +0000
committerAnand Avati <avati@gluster.com>2011-07-12 09:03:03 -0700
commit1d0cb953bb117689fb8381d65932ead486d13b05 (patch)
tree50e87fcca9bcbac92e116c53dd7bb918ee6b031c /cli/src/cli-cmd-parser.c
parentf9e0638b7597f4b1a4245f63c94d3d6bd3158136 (diff)
mgmt/Glusterd: Implementation volume set help/help-xml
Signed-off-by: Kaushik BV <kaushikbv@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2041 (volume set help option) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2041
Diffstat (limited to 'cli/src/cli-cmd-parser.c')
-rw-r--r--cli/src/cli-cmd-parser.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c
index 2c1897550..a8aebaeb0 100644
--- a/cli/src/cli-cmd-parser.c
+++ b/cli/src/cli-cmd-parser.c
@@ -657,7 +657,7 @@ cli_cmd_volume_set_parse (const char **words, int wordcount, dict_t **options)
if (!dict)
goto out;
- if (wordcount < 4)
+ if (wordcount < 3)
goto out;
volname = (char *)words[2];
@@ -666,6 +666,12 @@ cli_cmd_volume_set_parse (const char **words, int wordcount, dict_t **options)
ret = dict_set_str (dict, "volname", volname);
+ if (!strcmp (volname, "help") && !words[3] && !words[4])
+ ret = dict_set_str (dict, "help", volname);
+
+ if (!strcmp (volname, "help-xml") && !words[3] && !words[4])
+ ret = dict_set_str (dict, "help-xml", volname);
+
if (ret)
goto out;