add comments around /data/media
Change-Id: I35ad822ed602e2b1018f1e1a0d67499867b60a40
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.