diff options
author | Prashant Somashekar <prashsomash@gmail.com> | 2011-11-26 13:55:00 -0500 |
---|---|---|
committer | Prashant Somashekar <prashsomash@gmail.com> | 2011-12-18 02:52:30 -0500 |
commit | f0c389ddcdf3f48c2190b87aa17e2584e6512d31 (patch) | |
tree | d0973a414377e1a38796d478b328c4f93c89435c /nandroid.c | |
parent | 357a2f51097cef529ae53d5609aebfbbe3d0c1b3 (diff) | |
download | bootable_recovery-f0c389ddcdf3f48c2190b87aa17e2584e6512d31.zip bootable_recovery-f0c389ddcdf3f48c2190b87aa17e2584e6512d31.tar.gz bootable_recovery-f0c389ddcdf3f48c2190b87aa17e2584e6512d31.tar.bz2 |
nandroid/root/extendedcommands: attenuate for /data not being auto in fstab
Change-Id: I0e7bec03bb29f1ae72f23321f89cf704e54ff4d9
Diffstat (limited to 'nandroid.c')
-rw-r--r-- | nandroid.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -436,8 +436,10 @@ int nandroid_restore_partition_extended(const char* backup_path, const char* mou printf("Found new backup image: %s\n", tmp); } - // If the fs_type of this volume is "auto", let's revert to using a - // rm -rf, rather than trying to do a ext3/ext4/whatever format. + // If the fs_type of this volume is "auto" or mount_point is /data + // and vol for /sdcard is NULL and is_data_media, let's revert + // to using a rm -rf, rather than trying to do a + // ext3/ext4/whatever format. // This is because some phones (like DroidX) will freak out if you // reformat the /system or /data partitions, and not boot due to // a locked bootloader. @@ -449,6 +451,8 @@ int nandroid_restore_partition_extended(const char* backup_path, const char* mou // Or of volume does not exist (.android_secure), just rm -rf. if (vol == NULL || 0 == strcmp(vol->fs_type, "auto")) backup_filesystem = NULL; + else if (0 == strcmp(vol->mount_point, "/data") && volume_for_path("/sdcard") == NULL && is_data_media()) + backup_filesystem = NULL; } ensure_directory(mount_point); |