summaryrefslogtreecommitdiff
path: root/init/builtins.cpp
diff options
context:
space:
mode:
authorTom Cherry <tomcherry@google.com>2019-05-21 17:48:33 -0700
committerTom Cherry <tomcherry@google.com>2019-05-21 17:48:33 -0700
commit3041a5100bbf48dd15b3251aa3702bd5911d2ce1 (patch)
treec4263808aa99cdaaa1bd00fa1b5a673e949187e9 /init/builtins.cpp
parent7dc7c3a9c66cc5f934e57a57415dae33c4830841 (diff)
init: don't import rc files during mount_all after Q
Importing rc files during mount_all was at best a stop gap until Treble's first stage mount and at worst a bad idea. It doesn't have a reason to exist now that first stage mount exists and is required, and always had edge cases where init could not handle loading some aspects of scripts after it had started processing actions. This change removes this functionality for devices launching after Q. Test: devices boot Change-Id: I3181289572968637b884e150d36651f453d40362
Diffstat (limited to 'init/builtins.cpp')
-rw-r--r--init/builtins.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/init/builtins.cpp b/init/builtins.cpp
index 6ce773672..840f2d422 100644
--- a/init/builtins.cpp
+++ b/init/builtins.cpp
@@ -16,6 +16,7 @@
#include "builtins.h"
+#include <android/api-level.h>
#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
@@ -62,6 +63,7 @@
#include "action_manager.h"
#include "bootchart.h"
+#include "host_init_stubs.h"
#include "init.h"
#include "mount_namespace.h"
#include "parser.h"
@@ -588,7 +590,7 @@ static Result<Success> do_mount_all(const BuiltinArguments& args) {
auto mount_fstab_return_code = fs_mgr_mount_all(&fstab, mount_mode);
property_set(prop_name, std::to_string(t.duration().count()));
- if (import_rc) {
+ if (import_rc && SelinuxGetVendorAndroidVersion() <= __ANDROID_API_Q__) {
/* Paths of .rc files are specified at the 2nd argument and beyond */
import_late(args.args, 2, path_arg_end);
}