diff options
Diffstat (limited to 'cli/src/cli-cmd-parser.c')
-rw-r--r-- | cli/src/cli-cmd-parser.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c index ab18aa1ae6d..cc0a9aba96c 100644 --- a/cli/src/cli-cmd-parser.c +++ b/cli/src/cli-cmd-parser.c @@ -5094,7 +5094,7 @@ cli_cmd_bitrot_parse (const char **words, int wordcount, dict_t **options) "biweekly", "monthly", NULL}; char *scrub_values[] = {"pause", "resume", - NULL}; + "status", NULL}; dict_t *dict = NULL; gf_bitrot_type type = GF_BITROT_OPTION_TYPE_NONE; int32_t expiry_time = 0; @@ -5158,6 +5158,23 @@ cli_cmd_bitrot_parse (const char **words, int wordcount, dict_t **options) } } + if ((strcmp (words[3], "scrub") == 0) && + (strcmp (words[4], "status") == 0)) { + if (wordcount == 5) { + type = GF_BITROT_CMD_SCRUB_STATUS; + ret = dict_set_str (dict, "scrub-value", + (char *) words[4]); + if (ret) { + cli_out ("Failed to set dict for scrub status"); + goto out; + } + goto set_type; + } else { + ret = -1; + goto out; + } + } + if (!strcmp (w, "scrub-throttle")) { if (!words[4]) { cli_err ("Missing scrub-throttle value for bitrot " |