Mount /dev as tmpfs before creating directories inside

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
This commit is contained in:
Claudio Matsuoka
2008-06-27 08:56:47 -03:00
parent 25e9d84673
commit 134d9f3463
+3 -3
View File
@@ -302,6 +302,9 @@ int main()
#endif
umask(0);
if (mountdev)
mount("none", "/dev", "tmpfs", 0, "mode=0755");
#ifdef MAKE_DEVICES
mkdir("/dev/shm", 0755);
mkdir("/dev/pts", 0755);
@@ -316,9 +319,6 @@ int main()
mount("none", "/proc/bus/usb", "usbfs", 0, NULL);
mount(SYSROOT, "/", NULL, MS_MOVE, NULL);
if (mountdev)
mount("none", "/dev", "tmpfs", 0, "mode=0755");
#ifdef MAKE_DEVICES
mkdir("/dev/input", 0755);
chardev("/dev/urandom", 0666, 1, 9);