From 21824dddeb4474fadbb79c07fc76cd9f397d04f3 Mon Sep 17 00:00:00 2001 From: Tom Cherry Date: Tue, 2 Oct 2018 10:07:05 -0700 Subject: [PATCH] init: clarify why we mount /mnt/... in first stage init Test: n/a Change-Id: I55974fb285c55756536d038f4e20cb45d11906ee --- init/init_first_stage.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/init/init_first_stage.cpp b/init/init_first_stage.cpp index 0c4a11093..40706a177 100644 --- a/init/init_first_stage.cpp +++ b/init/init_first_stage.cpp @@ -84,6 +84,9 @@ int main(int argc, char** argv) { CHECKCALL(mknod("/dev/ptmx", S_IFCHR | 0666, makedev(5, 2))); CHECKCALL(mknod("/dev/null", S_IFCHR | 0666, makedev(1, 3))); + // These below mounts are done in first stage init so that first stage mount can mount + // subdirectories of /mnt/{vendor,product}/. Other mounts, not required by first stage mount, + // should be done in rc files. // Mount staging areas for devices managed by vold // See storage config details at http://source.android.com/devices/storage/ CHECKCALL(mount("tmpfs", "/mnt", "tmpfs", MS_NOEXEC | MS_NOSUID | MS_NODEV,