wimax restore should not be on by default

Change-Id: I1e1869e615905ce6dbefd0b1a8e64414f619508e
This commit is contained in:
Koushik Dutta 2010-12-29 23:36:03 -08:00
parent 1f76a5da6b
commit 5b7f34a2d8
3 changed files with 10 additions and 8 deletions

View File

@ -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(""));
}

View File

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

View File

@ -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();