diff options
Diffstat (limited to 'cli/src/cli-cmd-parser.c')
-rw-r--r-- | cli/src/cli-cmd-parser.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c index d363e934a..17f03bb1c 100644 --- a/cli/src/cli-cmd-parser.c +++ b/cli/src/cli-cmd-parser.c @@ -667,14 +667,20 @@ cli_cmd_volume_set_parse (const char **words, int wordcount, dict_t **options) if (ret) goto out; - if (!strcmp (volname, "help") && wordcount == 3 ) - ret = dict_set_str (dict, "help", volname); - - if (!strcmp (volname, "help-xml") && wordcount == 3 ) - ret = dict_set_str (dict, "help-xml", volname); - - if (ret) - goto out; + if (wordcount == 3) { + if (!strcmp (volname, "help")) { + ret = dict_set_str (dict, "help", volname); + if (ret) + goto out; + } else if (!strcmp (volname, "help-xml")) { + ret = dict_set_str (dict, "help-xml", volname); + if (ret) + goto out; + } else { + ret = -1; + goto out; + } + } for (i = 3; i < wordcount; i+=2) { |