fix up the mount options to match what openwrt had before using procd as pid 1
[project/procd.git] / early.c
diff --git a/early.c b/early.c
index 063e1a6abcc8ecdf22b9c8c11b2e81cc2460bcea..27d092971cd1437adc2dee08359d99225890eb77 100644 (file)
--- a/early.c
+++ b/early.c
 
 static void early_mounts(void)
 {
-       mount("proc", "/proc", "proc", 0, 0);
-       mount("sysfs", "/sys", "sysfs", 0, 0);
+       mount("proc", "/proc", "proc", MS_NOATIME, 0);
+       mount("sysfs", "/sys", "sysfs", MS_NOATIME, 0);
 
-       mount("tmpfs", "/tmp", "tmpfs", MS_NOSUID | MS_NODEV, "size=512k,mode=1777");
+       mount("tmpfs", "/tmp", "tmpfs", MS_NOSUID | MS_NODEV | MS_NOATIME, NULL);
        mkdir("/tmp/run", 0777);
        mkdir("/tmp/lock", 0777);
        mkdir("/tmp/state", 0777);
        symlink("/tmp", "/var");
 
-       mount("tmpfs", "/dev", "tmpfs", 0, "mode=0755,size=512K");
+       mount("tmpfs", "/dev", "tmpfs", MS_NOATIME, "mode=0755,size=512K");
        mkdir("/dev/shm", 0755);
        mkdir("/dev/pts", 0755);
-       mount("devpts", "/dev/pts", "devpts", 0, 0);
+       mount("devpts", "/dev/pts", "devpts", MS_NOATIME, "mode=600");
 }
 
 static void early_dev(void)