summaryrefslogtreecommitdiffstats
path: root/cli/src/cli-cmd-snapshot.c
diff options
context:
space:
mode:
authorRajesh Joseph <rjoseph@redhat.com>2014-01-15 01:10:39 -0800
committerGerrit Code Review <review@dev.gluster.org>2014-01-15 01:10:39 -0800
commit0473ec32d337d54262643a44c7ff0c42e57a0ab1 (patch)
tree1b9b18639c801f8242f01aab405e2018ae591c03 /cli/src/cli-cmd-snapshot.c
parent6350f623853acf82d7d09a89c79a4ab5d6655fff (diff)
parentf05bd50f2de5001cbd7b45e3c4164b6d131b17b0 (diff)
Merge "glusterd/snapshot: A Warning must be displayed before the snapshot is deleted" into development
Diffstat (limited to 'cli/src/cli-cmd-snapshot.c')
-rw-r--r--cli/src/cli-cmd-snapshot.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/cli/src/cli-cmd-snapshot.c b/cli/src/cli-cmd-snapshot.c
index 6d31dc2d5..f16e68dd6 100644
--- a/cli/src/cli-cmd-snapshot.c
+++ b/cli/src/cli-cmd-snapshot.c
@@ -53,8 +53,14 @@ cli_cmd_snapshot_cbk (struct cli_state *state, struct cli_cmd_word *word,
/* Parses the command entered by the user */
ret = cli_cmd_snapshot_parse (words, wordcount, &options, state);
if (ret) {
- cli_usage_out (word->pattern);
- parse_err = 1;
+ if (ret < 0) {
+ cli_usage_out (word->pattern);
+ parse_err = 1;
+ }
+ else {
+ /* User might have cancelled the snapshot operation */
+ ret = 0;
+ }
goto out;
}