summaryrefslogtreecommitdiffstats
path: root/cli/src
diff options
context:
space:
mode:
Diffstat (limited to 'cli/src')
-rw-r--r--cli/src/cli-cmd-parser.c23
-rw-r--r--cli/src/cli-rpc-ops.c13
2 files changed, 12 insertions, 24 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;
diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c
index b7c6691abd5..d195db5f6e0 100644
--- a/cli/src/cli-rpc-ops.c
+++ b/cli/src/cli-rpc-ops.c
@@ -7808,17 +7808,16 @@ cli_snapshot_config_display (dict_t *dict, gf_cli_rsp *rsp)
"& snap-max-soft-limit for system set "
"successfully");
} else if (hard_limit) {
- cli_out ("snapshot config: %s "
- "for snap-max-hard-limit set successfully",
+ cli_out ("snapshot config: snap-max-hard-limit "
+ "for %s set successfully",
volname);
} else if (soft_limit) {
- cli_out ("snapshot config: %s "
- "for snap-max-soft-limit set successfully",
+ cli_out ("snapshot config: snap-max-soft-limit "
+ "for %s set successfully",
volname);
} else if (auto_delete) {
- cli_out ("snapshot config: %s "
- "auto-delete successfully %sd",
- volname, auto_delete);
+ cli_out ("snapshot config: auto-delete "
+ "successfully set");
}
break;