1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-10 11:57:35 +00:00

Kernel+Userland: Implement mknod() syscall and add a /bin/mknod program.

This commit is contained in:
Andreas Kling 2019-05-03 22:59:58 +02:00
parent abb5c890e0
commit 8b249bd09b
15 changed files with 107 additions and 14 deletions

View file

@ -2553,3 +2553,11 @@ void Process::FileDescriptorAndFlags::set(Retained<FileDescriptor>&& d, dword f)
descriptor = move(d);
flags = f;
}
int Process::sys$mknod(const char* pathname, mode_t mode, dev_t dev)
{
if (!validate_read_str(pathname))
return -EFAULT;
return VFS::the().mknod(StringView(pathname), mode, dev, cwd_inode());
}