sd-ext should not show an error when trying to back it up and it is not there

This commit is contained in:
Koushik K. Dutta 2010-04-02 22:17:42 -07:00
parent 1d53c4ea63
commit 71ef11f2d5

View File

@ -142,9 +142,10 @@ int nandroid_backup(char* backup_path)
if (0 != (ret = nandroid_backup_partition(backup_path, "CACHE:")))
return ret;
if (0 != ensure_root_path_mounted("SDEXT:"))
ui_print("No sd-ext found. Skipping backup.\n");
else if (0 != (ret = nandroid_backup_partition(backup_path, "SDEXT:")))
struct stat st;
if (0 != stat("/dev/block/mmcblk0p2", &st))
ui_print("No sd-ext found. Skipping backup of sd-ext.\n");
else if (0 != (ret = ensure_root_path_mounted("SDEXT:")) || 0 != (ret = nandroid_backup_partition(backup_path, "SDEXT:")))
return ret;
ui_print("Generating md5 sum...\n");