yes/no only, yes before no
This commit is contained in:
parent
eee085415f
commit
907ed71a5c
@ -394,21 +394,12 @@ int confirm_selection(const char* title, const char* confirm)
|
||||
return 1;
|
||||
|
||||
char* confirm_headers[] = { title, " THIS CAN NOT BE UNDONE.", "", NULL };
|
||||
char* items[] = { "No",
|
||||
"No",
|
||||
"No",
|
||||
"No",
|
||||
"No",
|
||||
"No",
|
||||
"No",
|
||||
confirm, //" Yes -- wipe partition", // [7
|
||||
"No",
|
||||
"No",
|
||||
char* items[] = { confirm, //" Yes -- wipe partition", // [0]
|
||||
"No",
|
||||
NULL };
|
||||
|
||||
int chosen_item = get_menu_selection(confirm_headers, items, 0, 0);
|
||||
return chosen_item == 7;
|
||||
return chosen_item == 0;
|
||||
}
|
||||
|
||||
#define MKE2FS_BIN "/sbin/mke2fs"
|
||||
|
13
recovery.c
13
recovery.c
@ -658,21 +658,12 @@ wipe_data(int confirm) {
|
||||
title_headers = prepend_title((const char**)headers);
|
||||
}
|
||||
|
||||
char* items[] = { " No",
|
||||
" No",
|
||||
" No",
|
||||
" No",
|
||||
" No",
|
||||
" No",
|
||||
" No",
|
||||
" Yes -- delete all user data", // [7]
|
||||
" No",
|
||||
" No",
|
||||
char* items[] = { " Yes -- delete all user data", // [0]
|
||||
" No",
|
||||
NULL };
|
||||
|
||||
int chosen_item = get_menu_selection(title_headers, items, 1, 0);
|
||||
if (chosen_item != 7) {
|
||||
if (chosen_item != 0) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user