add comments around /data/media
Change-Id: I35ad822ed602e2b1018f1e1a0d67499867b60a40
diff --git a/nandroid.c b/nandroid.c
index 76d0962..fc39359 100644
--- a/nandroid.c
+++ b/nandroid.c
@@ -437,7 +437,7 @@
}
// 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
diff --git a/roots.c b/roots.c
index 4997350..9a43bb4 100644
--- a/roots.c
+++ b/roots.c
@@ -334,8 +334,10 @@
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.