init: Mount /dev/pts on startup
This commit is contained in:
parent
fd46d134aa
commit
d7db4e6147
@ -339,6 +339,13 @@ static void mount_shmfs()
|
|||||||
if (chmod("/dev/shm", 01777) < 0) exit(255);
|
if (chmod("/dev/shm", 01777) < 0) exit(255);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void mount_devpts()
|
||||||
|
{
|
||||||
|
if (mkdir("/dev/pts", 0755) < 0) exit(255);
|
||||||
|
|
||||||
|
if (mount("/dev/pts", "devpts", "devpts") < 0) exit(255);
|
||||||
|
}
|
||||||
|
|
||||||
Result<int> sysinit(StringView path)
|
Result<int> sysinit(StringView path)
|
||||||
{
|
{
|
||||||
if (getpid() != 1)
|
if (getpid() != 1)
|
||||||
@ -359,6 +366,7 @@ Result<int> sysinit(StringView path)
|
|||||||
|
|
||||||
mount_tmpfs();
|
mount_tmpfs();
|
||||||
mount_shmfs();
|
mount_shmfs();
|
||||||
|
mount_devpts();
|
||||||
|
|
||||||
umask(022);
|
umask(022);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user