From b0a63d857fdf6dd5fe4ae61644a6d83098acd07a Mon Sep 17 00:00:00 2001 From: Chris41g Date: Tue, 15 Nov 2011 10:33:17 -0600 Subject: [PATCH] Update extendedcommands.c one "No". --- extendedcommands.c | 40 ++++++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/extendedcommands.c b/extendedcommands.c index 70c57fd..6db4541 100644 --- a/extendedcommands.c +++ b/extendedcommands.c @@ -411,22 +411,30 @@ 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", - "No", - NULL }; - - int chosen_item = get_menu_selection(confirm_headers, items, 0, 0); - return chosen_item == 7; -} + if (0 == stat("/sdcard/clockworkmod/.one_confirm", &info)) { + char* items[] = { "No", + confirm, //" Yes -- wipe partition", // [1] + NULL }; + int chosen_item = get_menu_selection(confirm_headers, items, 0, 0); + return chosen_item == 1; + } + else { + char* items[] = { "No", + "No", + "No", + "No", + "No", + "No", + "No", + confirm, //" Yes -- wipe partition", // [7] + "No", + "No", + "No", + NULL }; + int chosen_item = get_menu_selection(confirm_headers, items, 0, 0); + return chosen_item == 7; + } + } #define MKE2FS_BIN "/sbin/mke2fs" #define TUNE2FS_BIN "/sbin/tune2fs"