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
commit 8b249bd09b
Notes: sideshowbarker 2024-07-19 14:17:28 +09:00
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());
}