Revert "Format formattable partitions if mount fails"
This reverts commit 29dd6b6c01295222fee5ef2fc70692b2ecb12504.
Change-Id: I7b76cd920019ae8cb7270b3f83e777ea9de7f7a4
diff --git a/roots.cpp b/roots.cpp
index 184e799..303381e 100644
--- a/roots.cpp
+++ b/roots.cpp
@@ -128,17 +128,6 @@
if (strcmp(v->fs_type, "ext4") == 0 || strcmp(v->fs_type, "squashfs") == 0 ||
strcmp(v->fs_type, "vfat") == 0) {
int result = mount(v->blk_device, mount_point, v->fs_type, v->flags, v->fs_options);
- if (result == -1 && fs_mgr_is_formattable(v)) {
- PLOG(ERROR) << "Failed to mount " << mount_point << "; formatting";
- bool crypt_footer = fs_mgr_is_encryptable(v) && !strcmp(v->key_loc, "footer");
- if (fs_mgr_do_format(v, crypt_footer) == 0) {
- result = mount(v->blk_device, mount_point, v->fs_type, v->flags, v->fs_options);
- } else {
- PLOG(ERROR) << "Failed to format " << mount_point;
- return -1;
- }
- }
-
if (result == -1) {
PLOG(ERROR) << "Failed to mount " << mount_point;
return -1;