Add support for wimax imaging
Change-Id: I2f14918f3ffb37fe94bab469e1d89a9874d89d18
diff --git a/extendedcommands.c b/extendedcommands.c
index 297f811..3113ab8 100644
--- a/extendedcommands.c
+++ b/extendedcommands.c
@@ -214,20 +214,20 @@
return NULL;
}
- // sort the result
- if (files != NULL) {
- for (i = 0; i < total; i++) {
- int curMax = -1;
- int j;
- for (j = 0; j < total - i; j++) {
- if (curMax == -1 || strcmp(files[curMax], files[j]) < 0)
- curMax = j;
- }
- char* temp = files[curMax];
- files[curMax] = files[total - i - 1];
- files[total - i - 1] = temp;
- }
- }
+ // sort the result
+ if (files != NULL) {
+ for (i = 0; i < total; i++) {
+ int curMax = -1;
+ int j;
+ for (j = 0; j < total - i; j++) {
+ if (curMax == -1 || strcmp(files[curMax], files[j]) < 0)
+ curMax = j;
+ }
+ char* temp = files[curMax];
+ files[curMax] = files[total - i - 1];
+ files[total - i - 1] = temp;
+ }
+ }
return files;
}
@@ -337,7 +337,7 @@
return;
if (confirm_selection("Confirm restore?", "Yes - Restore"))
- nandroid_restore(file, 1, 1, 1, 1, 1);
+ nandroid_restore(file, 1, 1, 1, 1, 1, 1);
}
void show_mount_usb_storage_menu()
@@ -648,6 +648,7 @@
"Restore data",
"Restore cache",
"Restore sd-ext",
+ "Restore wimax",
NULL
};
@@ -659,23 +660,27 @@
{
case 0:
if (confirm_selection(confirm_restore, "Yes - Restore boot"))
- nandroid_restore(file, 1, 0, 0, 0, 0);
+ nandroid_restore(file, 1, 0, 0, 0, 0, 0);
break;
case 1:
if (confirm_selection(confirm_restore, "Yes - Restore system"))
- nandroid_restore(file, 0, 1, 0, 0, 0);
+ nandroid_restore(file, 0, 1, 0, 0, 0, 0);
break;
case 2:
if (confirm_selection(confirm_restore, "Yes - Restore data"))
- nandroid_restore(file, 0, 0, 1, 0, 0);
+ nandroid_restore(file, 0, 0, 1, 0, 0, 0);
break;
case 3:
if (confirm_selection(confirm_restore, "Yes - Restore cache"))
- nandroid_restore(file, 0, 0, 0, 1, 0);
+ nandroid_restore(file, 0, 0, 0, 1, 0, 0);
break;
case 4:
if (confirm_selection(confirm_restore, "Yes - Restore sd-ext"))
- nandroid_restore(file, 0, 0, 0, 0, 1);
+ nandroid_restore(file, 0, 0, 0, 0, 1, 0);
+ break;
+ case 5:
+ if (confirm_selection(confirm_restore, "Yes - Restore wimax"))
+ nandroid_restore(file, 0, 0, 0, 0, 0, 1);
break;
}
}
@@ -997,7 +1002,7 @@
ui_print("in case of error.\n");
nandroid_backup(backup_path);
- nandroid_restore(backup_path, 1, 1, 1, 1, 1);
+ nandroid_restore(backup_path, 1, 1, 1, 1, 1, 1);
ui_set_show_text(0);
}