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 /roots.c | |
parent | 357a2f51097cef529ae53d5609aebfbbe3d0c1b3 (diff) | |
download | android_bootable_recovery-f0c389ddcdf3f48c2190b87aa17e2584e6512d31.tar.gz android_bootable_recovery-f0c389ddcdf3f48c2190b87aa17e2584e6512d31.tar.bz2 android_bootable_recovery-f0c389ddcdf3f48c2190b87aa17e2584e6512d31.zip |
nandroid/root/extendedcommands: attenuate for /data not being auto in fstab
Change-Id: I0e7bec03bb29f1ae72f23321f89cf704e54ff4d9
Diffstat (limited to 'roots.c')
-rw-r--r-- | roots.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -197,7 +197,7 @@ int try_mount(const char* device, const char* mount_point, const char* fs_type, int is_data_media() { Volume *data = volume_for_path("/data"); - return data != NULL && strcmp(data->fs_type, "auto") == 0 && volume_for_path("/sdcard") == NULL; + return data != NULL && strcmp(data->fs_type, "auto") == 0 || volume_for_path("/sdcard") == NULL; } void setup_data_media() { @@ -334,6 +334,9 @@ int format_volume(const char* volume) { LOGE("unknown volume \"%s\"\n", volume); return -1; } + if (strstr(volume, "/data") == volume && volume_for_path("/sdcard") == NULL && is_data_media()) { + return format_unknown_device(NULL, volume, NULL); + } if (strcmp(v->fs_type, "ramdisk") == 0) { // you can't format the ramdisk. LOGE("can't format_volume \"%s\"", volume); |