init: Mount /dev/pts on startup

This commit is contained in:
apio 2023-09-16 11:47:43 +02:00
parent fd46d134aa
commit d7db4e6147
Signed by: apio
GPG Key ID: B8A7D06E42258954

View File

@ -339,6 +339,13 @@ static void mount_shmfs()
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)
{
if (getpid() != 1)
@ -359,6 +366,7 @@ Result<int> sysinit(StringView path)
mount_tmpfs();
mount_shmfs();
mount_devpts();
umask(022);