aboutsummaryrefslogtreecommitdiffstats
path: root/roots.c
diff options
context:
space:
mode:
authorChirayu Desai <chirayudesai1@gmail.com>2012-05-31 19:18:00 +0530
committerKoushik Dutta <koushd@gmail.com>2012-11-21 16:18:57 -0800
commit1606b8a226ad6a2d7b2201f3e31b214322a56566 (patch)
treebfa737d7d7798a55a01ac9319f57b2c889b88556 /roots.c
parenta2cac122888ecbf17271fc0437b6c5850de59502 (diff)
downloadandroid_bootable_recovery-1606b8a226ad6a2d7b2201f3e31b214322a56566.tar.gz
android_bootable_recovery-1606b8a226ad6a2d7b2201f3e31b214322a56566.tar.bz2
android_bootable_recovery-1606b8a226ad6a2d7b2201f3e31b214322a56566.zip
Remove wipe battery stats garbage.
Add support for doing a true ext4 format of /data on /data/media devices. Change-Id: Ie6706989705e4cf90d0be119c7ffc54b2191d198
Diffstat (limited to 'roots.c')
-rw-r--r--roots.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/roots.c b/roots.c
index d3dafcd8..401fb26b 100644
--- a/roots.c
+++ b/roots.c
@@ -341,6 +341,7 @@ int ensure_path_unmounted(const char* path) {
}
extern struct selabel_handle *sehandle;
+static int handle_data_media = 0;
int format_volume(const char* volume) {
Volume* v = volume_for_path(volume);
@@ -356,7 +357,7 @@ int format_volume(const char* volume) {
}
// 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 && is_data_media()) {
+ if (strstr(volume, "/data") == volume && is_data_media() && !handle_data_media) {
return format_unknown_device(NULL, volume, NULL);
}
if (strcmp(v->fs_type, "ramdisk") == 0) {
@@ -415,3 +416,7 @@ int format_volume(const char* volume) {
#endif
return format_unknown_device(v->device, volume, v->fs_type);
}
+
+void handle_data_media_format(int handle) {
+ handle_data_media = handle;
+}