mirror of
https://github.com/RGBCube/serenity
synced 2025-07-10 09:07:35 +00:00
Kernel+Userland: Implement mknod() syscall and add a /bin/mknod program.
This commit is contained in:
parent
abb5c890e0
commit
8b249bd09b
15 changed files with 107 additions and 14 deletions
|
@ -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());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue