summaryrefslogtreecommitdiffstats
path: root/cli
diff options
context:
space:
mode:
Diffstat (limited to 'cli')
-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 84d836e187a..b4dc3fe49bd 100644
--- a/cli/src/cli-cmd-parser.c
+++ b/cli/src/cli-cmd-parser.c
@@ -3917,25 +3917,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 6834e28decf..a240f376f7f 100644
--- a/cli/src/cli-rpc-ops.c
+++ b/cli/src/cli-rpc-ops.c
@@ -7811,17 +7811,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;