summaryrefslogtreecommitdiffstats
path: root/cli/src/cli-cmd-parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'cli/src/cli-cmd-parser.c')
-rw-r--r--cli/src/cli-cmd-parser.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c
index 921648f2822..ef07e88b795 100644
--- a/cli/src/cli-cmd-parser.c
+++ b/cli/src/cli-cmd-parser.c
@@ -5116,7 +5116,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;
@@ -5180,6 +5180,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 "