add comments around /data/media
Change-Id: I35ad822ed602e2b1018f1e1a0d67499867b60a40
This commit is contained in:
parent
d4c04cb00b
commit
9487d2965f
@ -437,7 +437,7 @@ int nandroid_restore_partition_extended(const char* backup_path, const char* mou
|
||||
}
|
||||
|
||||
// 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
|
||||
// and is_data_media (redundantly, and vol for /sdcard is NULL), 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
|
||||
|
4
roots.c
4
roots.c
@ -334,8 +334,10 @@ int format_volume(const char* volume) {
|
||||
LOGE("unknown volume \"%s\"\n", volume);
|
||||
return -1;
|
||||
}
|
||||
// check to see if /data is being formatted, and if it is /data/media
|
||||
// Note: the /sdcard check is redundant probably, just being safe.
|
||||
if (strstr(volume, "/data") == volume && volume_for_path("/sdcard") == NULL && is_data_media()) {
|
||||
return format_unknown_device(NULL, volume, NULL);
|
||||
return format_unknown_device(NULL, volume, NULL);
|
||||
}
|
||||
if (strcmp(v->fs_type, "ramdisk") == 0) {
|
||||
// you can't format the ramdisk.
|
||||
|
Loading…
Reference in New Issue
Block a user