From db4190c5bf6675afcf7dd002a6f9d6668a8620fc Mon Sep 17 00:00:00 2001 From: Tom Marshall Date: Wed, 6 Sep 2017 17:49:04 +0000 Subject: [PATCH] Revert "Format formattable partitions if mount fails" This reverts commit 29dd6b6c01295222fee5ef2fc70692b2ecb12504. This is required because recovery tries to mount userdata, but on some FBE encrypted devices it doesn't work so it gets wiped! Change-Id: I7b76cd920019ae8cb7270b3f83e777ea9de7f7a4 Signed-off-by: Adithya R (cherry picked from commit 30e49a2f4838d18fcad9e91e937195805c961e52) --- fs_mgr/fs_mgr_roots.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/fs_mgr/fs_mgr_roots.cpp b/fs_mgr/fs_mgr_roots.cpp index 2ad8125e7..ba5dc5f9d 100644 --- a/fs_mgr/fs_mgr_roots.cpp +++ b/fs_mgr/fs_mgr_roots.cpp @@ -123,14 +123,6 @@ bool TryPathMount(FstabEntry* rec, const std::string& mount_pt) { } int result = fs_mgr_do_mount_one(*rec, mount_point); - if (result == -1 && rec->fs_mgr_flags.formattable) { - PERROR << "Failed to mount " << mount_point << "; formatting"; - if (fs_mgr_do_format(*rec) != 0) { - PERROR << "Failed to format " << mount_point; - return false; - } - result = fs_mgr_do_mount_one(*rec, mount_point); - } if (result == -1) { PERROR << "Failed to mount " << mount_point;