summaryrefslogtreecommitdiffstats
path: root/cli/src/cli-cmd-snapshot.c
diff options
context:
space:
mode:
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;
}