format BOOT on nandroid restore.

This commit is contained in:
Koushik K. Dutta 2010-04-18 21:21:58 -07:00
parent f3534d08eb
commit 8430655931
2 changed files with 4 additions and 1 deletions

View File

@ -26,7 +26,7 @@ LOCAL_MODULE := recovery
LOCAL_FORCE_STATIC_EXECUTABLE := true
RECOVERY_VERSION := ClockworkMod Recovery v1.8.1.0
RECOVERY_VERSION := ClockworkMod Recovery v1.8.1.1
LOCAL_CFLAGS := -DRECOVERY_VERSION="$(RECOVERY_VERSION)"
RECOVERY_API_VERSION := 2
LOCAL_CFLAGS += -DRECOVERY_API_VERSION=$(RECOVERY_API_VERSION)

View File

@ -224,6 +224,9 @@ int nandroid_restore(const char* backup_path, int restore_boot, int restore_syst
int ret;
if (restore_boot)
{
ui_print("Erasing boot before restore...\n");
if (0 != (ret = format_root_device("BOOT:")))
return print_and_error("Error while formatting BOOT:!\n");
sprintf(tmp, "flash_image boot %s/boot.img", backup_path);
ui_print("Restoring boot image...\n");
if (0 != (ret = __system(tmp))) {