diff options
Diffstat (limited to 'cli/src/cli-cmd-parser.c')
| -rw-r--r-- | cli/src/cli-cmd-parser.c | 20 | 
1 files changed, 16 insertions, 4 deletions
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c index 482010ce502..9e112954811 100644 --- a/cli/src/cli-cmd-parser.c +++ b/cli/src/cli-cmd-parser.c @@ -1075,8 +1075,13 @@ cli_cmd_quota_parse (const char **words, int wordcount, dict_t **options)                  goto out;          } -        if (wordcount < 4) +        if (wordcount < 4) { + +                if ((wordcount == 3) && !(strcmp (words[2], "help"))) { +                        ret = 1; +                }                  goto out; +        }          volname = (char *)words[2];          if (!volname) { @@ -5477,15 +5482,22 @@ cli_cmd_bitrot_parse (const char **words, int wordcount, dict_t **options)          GF_ASSERT (words);          GF_ASSERT (options); -        dict = dict_new (); -        if (!dict) -                goto out; + +        /* Hack to print out bitrot help properly */ +        if ((wordcount == 3) && !(strcmp (words[2], "help"))) { +                ret = 1; +                return ret; +        }          if (wordcount < 4 || wordcount > 5) {                  gf_log ("cli", GF_LOG_ERROR, "Invalid syntax");                  goto out;          } +        dict = dict_new (); +        if (!dict) +                goto out; +          volname = (char *)words[2];          if (!volname) {                  ret = -1;  | 
