summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorTom Cherry2018-07-30 18:23:49 -0500
committerTom Cherry2018-07-31 15:58:17 -0500
commit81ae07509d3b911915a63dddcd83ac2398dd9583 (patch)
tree2f6343505902173156cffa142eff9f0c279ab4bc /init
parent28fb130cbbd7c01ef706d5b6a5a9877b290f275c (diff)
downloadplatform-system-core-81ae07509d3b911915a63dddcd83ac2398dd9583.tar.gz
platform-system-core-81ae07509d3b911915a63dddcd83ac2398dd9583.tar.xz
platform-system-core-81ae07509d3b911915a63dddcd83ac2398dd9583.zip
init: run fsck for early mount partitions
Bug: 111883560 Test: fsck runs successfully during early mount Change-Id: I19bcd2610f87f5331f94c228fcbec8f9379fc5e8
Diffstat (limited to 'init')
-rw-r--r--init/init.cpp4
-rw-r--r--init/selinux.cpp2
2 files changed, 6 insertions, 0 deletions
diff --git a/init/init.cpp b/init/init.cpp
index 6569871b8..57309651c 100644
--- a/init/init.cpp
+++ b/init/init.cpp
@@ -667,6 +667,10 @@ int main(int argc, char** argv) {
667 CHECKCALL(mknod("/dev/random", S_IFCHR | 0666, makedev(1, 8))); 667 CHECKCALL(mknod("/dev/random", S_IFCHR | 0666, makedev(1, 8)));
668 CHECKCALL(mknod("/dev/urandom", S_IFCHR | 0666, makedev(1, 9))); 668 CHECKCALL(mknod("/dev/urandom", S_IFCHR | 0666, makedev(1, 9)));
669 669
670 // This is needed for log wrapper, which gets called before ueventd runs.
671 CHECKCALL(mknod("/dev/ptmx", S_IFCHR | 0666, makedev(5, 2)));
672 CHECKCALL(mknod("/dev/null", S_IFCHR | 0666, makedev(1, 3)));
673
670 // Mount staging areas for devices managed by vold 674 // Mount staging areas for devices managed by vold
671 // See storage config details at http://source.android.com/devices/storage/ 675 // See storage config details at http://source.android.com/devices/storage/
672 CHECKCALL(mount("tmpfs", "/mnt", "tmpfs", MS_NOEXEC | MS_NOSUID | MS_NODEV, 676 CHECKCALL(mount("tmpfs", "/mnt", "tmpfs", MS_NOEXEC | MS_NOSUID | MS_NODEV,
diff --git a/init/selinux.cpp b/init/selinux.cpp
index 94f206ede..b788be9d6 100644
--- a/init/selinux.cpp
+++ b/init/selinux.cpp
@@ -414,6 +414,8 @@ void SelinuxRestoreContext() {
414 if constexpr (WORLD_WRITABLE_KMSG) { 414 if constexpr (WORLD_WRITABLE_KMSG) {
415 selinux_android_restorecon("/dev/kmsg_debug", 0); 415 selinux_android_restorecon("/dev/kmsg_debug", 0);
416 } 416 }
417 selinux_android_restorecon("/dev/null", 0);
418 selinux_android_restorecon("/dev/ptmx", 0);
417 selinux_android_restorecon("/dev/socket", 0); 419 selinux_android_restorecon("/dev/socket", 0);
418 selinux_android_restorecon("/dev/random", 0); 420 selinux_android_restorecon("/dev/random", 0);
419 selinux_android_restorecon("/dev/urandom", 0); 421 selinux_android_restorecon("/dev/urandom", 0);