From 5b7f34a2d894da120ec306000696f348a8e5e993 Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Wed, 29 Dec 2010 23:36:03 -0800 Subject: [PATCH] wimax restore should not be on by default Change-Id: I1e1869e615905ce6dbefd0b1a8e64414f619508e --- edifyscripting.c | 5 +---- extendedcommands.c | 11 ++++++++--- nandroid.c | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/edifyscripting.c b/edifyscripting.c index f7616ef..7d0d728 100644 --- a/edifyscripting.c +++ b/edifyscripting.c @@ -174,7 +174,6 @@ Value* RestoreFn(const char* name, State* state, int argc, Expr* argv[]) { int restoredata = 1; int restorecache = 1; int restoresdext = 1; - int restorewimax = 1; int i; for (i = 1; i < argc; i++) { @@ -190,8 +189,6 @@ Value* RestoreFn(const char* name, State* state, int argc, Expr* argv[]) { restorecache = 0; else if (strcmp(args2[i], "nosd-ext") == 0) restoresdext = 0; - else if (strcmp(args2[i], "nowimax") == 0) - restorewimax = 0; } for (i = 0; i < argc; ++i) { @@ -200,7 +197,7 @@ Value* RestoreFn(const char* name, State* state, int argc, Expr* argv[]) { free(args); free(args2); - if (0 != nandroid_restore(path, restoreboot, restoresystem, restoredata, restorecache, restoresdext, restorewimax)) { + if (0 != nandroid_restore(path, restoreboot, restoresystem, restoredata, restorecache, restoresdext, 0)) { free(path); return StringValue(strdup("")); } diff --git a/extendedcommands.c b/extendedcommands.c index 3113ab8..d9589a4 100644 --- a/extendedcommands.c +++ b/extendedcommands.c @@ -337,7 +337,7 @@ void show_nandroid_restore_menu() return; if (confirm_selection("Confirm restore?", "Yes - Restore")) - nandroid_restore(file, 1, 1, 1, 1, 1, 1); + nandroid_restore(file, 1, 1, 1, 1, 1, 0); } void show_mount_usb_storage_menu() @@ -651,7 +651,12 @@ void show_nandroid_advanced_restore_menu() "Restore wimax", NULL }; - + + char tmp[PATH_MAX]; + if (0 != get_partition_device("wimax", tmp)) { + // disable wimax restore option + list[5] = NULL; + } static char* confirm_restore = "Confirm restore?"; @@ -1002,7 +1007,7 @@ void process_volumes() { ui_print("in case of error.\n"); nandroid_backup(backup_path); - nandroid_restore(backup_path, 1, 1, 1, 1, 1, 1); + nandroid_restore(backup_path, 1, 1, 1, 1, 1, 0); ui_set_show_text(0); } diff --git a/nandroid.c b/nandroid.c index 4a92e33..3812ed7 100644 --- a/nandroid.c +++ b/nandroid.c @@ -383,7 +383,7 @@ int nandroid_main(int argc, char** argv) { if (argc != 3) return nandroid_usage(); - return nandroid_restore(argv[2], 1, 1, 1, 1, 1, 1); + return nandroid_restore(argv[2], 1, 1, 1, 1, 1, 0); } return nandroid_usage();