summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2020-07-03 12:14:27 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-07-03 12:14:27 +0000
commit52feb83b51ff169f17fa2e9259671106b30eaff7 (patch)
tree8a6828abecd437298e017c83c6c6b0d888ca432f
parent5879334b0e6c1518d93426e4a3cfdca9e46c3110 (diff)
parent437ded4dbde2ccd6fd77d50ba759f7766bd843fd (diff)
Merge "Remove SkipMountingPartitions from vendor libfstab" am: 437ded4dbd
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1354545 Change-Id: I1c8983d21d3c63566dd6f22a6268bff97f86eaa0
-rw-r--r--fs_mgr/Android.bp8
-rw-r--r--fs_mgr/fs_mgr_fstab.cpp6
2 files changed, 14 insertions, 0 deletions
diff --git a/fs_mgr/Android.bp b/fs_mgr/Android.bp
index cd6459989..ac784b249 100644
--- a/fs_mgr/Android.bp
+++ b/fs_mgr/Android.bp
@@ -149,6 +149,14 @@ cc_library_static {
darwin: {
enabled: false,
},
+ vendor: {
+ cflags: [
+ // Skipping entries in fstab should only be done in a system
+ // process as the config file is in /system_ext.
+ // Remove the op from the vendor variant.
+ "-DNO_SKIP_MOUNT",
+ ],
+ },
},
export_include_dirs: ["include_fstab"],
header_libs: [
diff --git a/fs_mgr/fs_mgr_fstab.cpp b/fs_mgr/fs_mgr_fstab.cpp
index f333a8561..54102ec1b 100644
--- a/fs_mgr/fs_mgr_fstab.cpp
+++ b/fs_mgr/fs_mgr_fstab.cpp
@@ -696,7 +696,9 @@ bool ReadFstabFromFile(const std::string& path, Fstab* fstab) {
TransformFstabForDsu(fstab, Split(lp_names, ","));
}
+#ifndef NO_SKIP_MOUNT
SkipMountingPartitions(fstab);
+#endif
EnableMandatoryFlags(fstab);
return true;
@@ -726,11 +728,14 @@ bool ReadFstabFromDt(Fstab* fstab, bool log) {
return false;
}
+#ifndef NO_SKIP_MOUNT
SkipMountingPartitions(fstab);
+#endif
return true;
}
+#ifndef NO_SKIP_MOUNT
// For GSI to skip mounting /product and /system_ext, until there are well-defined interfaces
// between them and /system. Otherwise, the GSI flashed on /system might not be able to work with
// device-specific /product and /system_ext. skip_mount.cfg belongs to system_ext partition because
@@ -762,6 +767,7 @@ bool SkipMountingPartitions(Fstab* fstab) {
return true;
}
+#endif
// Loads the fstab file and combines with fstab entries passed in from device tree.
bool ReadDefaultFstab(Fstab* fstab) {