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.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c
index 5e23d87..727206a 100644
--- a/cli/src/cli-cmd-parser.c
+++ b/cli/src/cli-cmd-parser.c
@@ -3504,6 +3504,15 @@ cli_cmd_snapshot_parse (const char **words, int wordcount, dict_t **options,
if (!strcmp (w, "restore"))
type = GF_SNAP_OPTION_TYPE_RESTORE;
+ if (type != GF_SNAP_OPTION_TYPE_CONFIG) {
+ ret = dict_set_int32 (dict, "hold_snap_locks", _gf_true);
+ if (ret) {
+ gf_log ("", GF_LOG_ERROR,
+ "Unable to set hold-snap-locks value as _gf_true");
+ goto out;
+ }
+ }
+
cmdi = 2;
/* Check which op is intended */