mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 23:25:20 +00:00
Kernel+Userland: Implement mknod() syscall and add a /bin/mknod program.
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user