fix up boot formatting. remove depracated function.
Change-Id: I9d707e62b1752079ec1b669a3800dbf12e035ead
This commit is contained in:
parent
2e45449ef3
commit
3affbec593
@ -514,7 +514,7 @@ void show_partition_menu()
|
||||
};
|
||||
|
||||
string devices[][2] = {
|
||||
{ "format boot", "boot:" },
|
||||
{ "format boot", "/boot" },
|
||||
{ "format system", "/system" },
|
||||
{ "format data", "/data" },
|
||||
{ "format cache", "/cache" },
|
||||
@ -576,7 +576,7 @@ void show_partition_menu()
|
||||
if (!confirm_selection(confirm_format, confirm))
|
||||
continue;
|
||||
ui_print("Formatting %s...\n", devices[chosen_item][1]);
|
||||
if (0 != format_device(devices[chosen_item][1]))
|
||||
if (0 != format_volume(devices[chosen_item][1]))
|
||||
ui_print("Error formatting %s!\n", devices[chosen_item][1]);
|
||||
else
|
||||
ui_print("Done.\n");
|
||||
@ -1091,18 +1091,6 @@ void handle_failure(int ret)
|
||||
ui_print("/tmp/recovery.log was copied to /sdcard/clockworkmod/recovery.log. Please open ROM Manager to report the issue.\n");
|
||||
}
|
||||
|
||||
int format_device(const char* device) {
|
||||
if (device == NULL)
|
||||
return -1;
|
||||
if (device[0] == '/') {
|
||||
Volume *vol = volume_for_path(device);
|
||||
if (vol == NULL)
|
||||
return -1;
|
||||
return erase_partition(device, vol->fs_type);
|
||||
}
|
||||
return erase_raw_partition(device);
|
||||
}
|
||||
|
||||
int is_path_mounted(const char* path) {
|
||||
Volume* v = volume_for_path(path);
|
||||
if (v == NULL) {
|
||||
|
Loading…
Reference in New Issue
Block a user