aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--recovery.c31
1 files changed, 2 insertions, 29 deletions
diff --git a/recovery.c b/recovery.c
index 8cfaa73..6f8edf6 100644
--- a/recovery.c
+++ b/recovery.c
@@ -637,35 +637,8 @@ update_directory(const char* path, const char* unmount_when_done) {
static void
wipe_data(int confirm) {
- if (confirm) {
- static char** title_headers = NULL;
-
- if (title_headers == NULL) {
- char* headers[] = { "Confirm wipe of all user data?",
- " THIS CAN NOT BE UNDONE.",
- "",
- NULL };
- title_headers = prepend_title((const char**)headers);
- }
-
- char* items[] = { " No",
- " No",
- " No",
- " No",
- " No",
- " No",
- " No",
- " Yes -- delete all user data", // [7]
- " No",
- " No",
- " No",
- NULL };
-
- int chosen_item = get_menu_selection(title_headers, items, 1, 0);
- if (chosen_item != 7) {
- return;
- }
- }
+ if (confirm && !confirm_selection( "Confirm wipe of all user data?", "Yes - Wipe all user data"))
+ return;
ui_print("\n-- Wiping data...\n");
device_wipe_data();