yes/no only, yes before no

This commit is contained in:
Arif Ali 2011-04-18 03:54:24 +01:00
parent eee085415f
commit 907ed71a5c
2 changed files with 4 additions and 22 deletions

View File

@ -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"

View File

@ -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;
}
}