diff options
Diffstat (limited to 'cli/src/cli-cmd-parser.c')
-rw-r--r-- | cli/src/cli-cmd-parser.c | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c index 4a00b8485d3..85a916e380c 100644 --- a/cli/src/cli-cmd-parser.c +++ b/cli/src/cli-cmd-parser.c @@ -3919,25 +3919,14 @@ cli_snap_config_parse (const char **words, int wordcount, dict_t *dict, goto out; } - if ((strcmp (words[cmdi], "enable") == 0) || - (strcmp (words[cmdi], "disable") == 0)) { - ret = dict_set_str (dict, "auto-delete", - (char *)words[cmdi]); - if (ret) { - gf_log ("cli", GF_LOG_ERROR, "Failed to set " - "value of auto-delete in request " - "dictionary"); - goto out; - } - auto_delete = 1; - } else { - ret = -1; - cli_err ("Please enter a valid value (enable/disable) " - "for auto-delete"); - gf_log ("cli", GF_LOG_ERROR, "Invalid value for " - "auto-delete"); + ret = dict_set_str (dict, "auto-delete", (char *)words[cmdi]); + if (ret) { + gf_log ("cli", GF_LOG_ERROR, "Failed to set " + "value of auto-delete in request " + "dictionary"); goto out; } + auto_delete = 1; if (++cmdi != wordcount) { ret = -1; |