diff options
author | Chris41g <chriswhite@cableone.net> | 2011-11-15 10:33:17 -0600 |
---|---|---|
committer | Koushik Dutta <koushd@gmail.com> | 2011-11-21 14:37:29 -0800 |
commit | d2eecca36062ef65b25c7ef49f2ca70e438d66c2 (patch) | |
tree | c068e00d10f77557187da6a65e794684b535ce1a /extendedcommands.c | |
parent | d280f6e0d868eb02a22008d74a66b5794f98eb67 (diff) | |
download | bootable_recovery-d2eecca36062ef65b25c7ef49f2ca70e438d66c2.zip bootable_recovery-d2eecca36062ef65b25c7ef49f2ca70e438d66c2.tar.gz bootable_recovery-d2eecca36062ef65b25c7ef49f2ca70e438d66c2.tar.bz2 |
Update extendedcommands.c one "No".
Diffstat (limited to 'extendedcommands.c')
-rw-r--r-- | extendedcommands.c | 40 |
1 files changed, 24 insertions, 16 deletions
diff --git a/extendedcommands.c b/extendedcommands.c index bbe6018..e6d87e9 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" |