Merge "Remove SkipMountingPartitions from vendor libfstab" am: 437ded4dbd am: 52feb83b51 am: 2268730110 am: b5086b62a8

Original change: https://android-review.googlesource.com/c/platform/system/core/+/1354545

Change-Id: I63fbc11c089adf3292f68026a18437503e8c7f40
This commit is contained in:
Treehugger Robot 2020-07-03 13:02:03 +00:00 committed by Automerger Merge Worker
commit c46a76134c
2 changed files with 14 additions and 0 deletions

View file

@ -149,6 +149,14 @@ cc_library_static {
darwin: { darwin: {
enabled: false, 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"], export_include_dirs: ["include_fstab"],
header_libs: [ header_libs: [

View file

@ -691,7 +691,9 @@ bool ReadFstabFromFile(const std::string& path, Fstab* fstab) {
TransformFstabForDsu(fstab, Split(lp_names, ",")); TransformFstabForDsu(fstab, Split(lp_names, ","));
} }
#ifndef NO_SKIP_MOUNT
SkipMountingPartitions(fstab); SkipMountingPartitions(fstab);
#endif
EnableMandatoryFlags(fstab); EnableMandatoryFlags(fstab);
return true; return true;
@ -721,11 +723,14 @@ bool ReadFstabFromDt(Fstab* fstab, bool log) {
return false; return false;
} }
#ifndef NO_SKIP_MOUNT
SkipMountingPartitions(fstab); SkipMountingPartitions(fstab);
#endif
return true; return true;
} }
#ifndef NO_SKIP_MOUNT
// For GSI to skip mounting /product and /system_ext, until there are well-defined interfaces // 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 // 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 // device-specific /product and /system_ext. skip_mount.cfg belongs to system_ext partition because
@ -757,6 +762,7 @@ bool SkipMountingPartitions(Fstab* fstab) {
return true; return true;
} }
#endif
// Loads the fstab file and combines with fstab entries passed in from device tree. // Loads the fstab file and combines with fstab entries passed in from device tree.
bool ReadDefaultFstab(Fstab* fstab) { bool ReadDefaultFstab(Fstab* fstab) {