init: Don't fail first stage mount for formattable partitions.
If a partition can be formatted by vold, then it doesn't make sense to
have first-stage mount fail if the partition hasn't been formatted yet.
Bug: 121209697
Test: device boots after fastboot flashall -w
Change-Id: I4a6c794a9912a5e0794983e9514a08f9c23e6ae9
diff --git a/init/first_stage_mount.cpp b/init/first_stage_mount.cpp
index acefdf0..b5ff658 100644
--- a/init/first_stage_mount.cpp
+++ b/init/first_stage_mount.cpp
@@ -395,6 +395,11 @@
return false;
}
if (fs_mgr_do_mount_one(*fstab_entry)) {
+ if (fstab_entry->fs_mgr_flags.formattable) {
+ PLOG(INFO) << "Failed to mount '" << fstab_entry->mount_point << "', "
+ << "ignoring mount for formattable partition";
+ return true;
+ }
PLOG(ERROR) << "Failed to mount '" << fstab_entry->mount_point << "'";
return false;
}