summaryrefslogtreecommitdiffstats
path: root/cli/src/cli-cmd-volume.c
diff options
context:
space:
mode:
Diffstat (limited to 'cli/src/cli-cmd-volume.c')
-rw-r--r--cli/src/cli-cmd-volume.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c
index 3c433c523e0..7a15f5cb356 100644
--- a/cli/src/cli-cmd-volume.c
+++ b/cli/src/cli-cmd-volume.c
@@ -234,6 +234,9 @@ cli_cmd_volume_delete_cbk (struct cli_state *state, struct cli_cmd_word *word,
rpc_clnt_procedure_t *proc = NULL;
call_frame_t *frame = NULL;
char *volname = NULL;
+ gf_answer_t answer = GF_ANSWER_NO;
+ const char *question = "Deleting volume will erase all information about the volume."
+ "Do you want to continue?";
proc = &cli_rpc_prog->proctable[GF1_CLI_DELETE_VOLUME];
@@ -246,6 +249,13 @@ cli_cmd_volume_delete_cbk (struct cli_state *state, struct cli_cmd_word *word,
goto out;
}
+ answer = cli_cmd_get_confirmation (state, question);
+
+ if (GF_ANSWER_NO == answer) {
+ ret = 0;
+ goto out;
+ }
+
volname = (char *)words[2];
if (proc->fn) {