mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 22:18:12 +00:00
Kernel: Pass a parameter struct to mknod()
This commit is contained in:
parent
6536a80aa9
commit
c97bfbd609
5 changed files with 35 additions and 11 deletions
|
@ -451,7 +451,12 @@ int access(const char* pathname, int mode)
|
|||
|
||||
int mknod(const char* pathname, mode_t mode, dev_t dev)
|
||||
{
|
||||
int rc = syscall(SC_mknod, pathname, mode, dev);
|
||||
if (!pathname) {
|
||||
errno = EFAULT;
|
||||
return -1;
|
||||
}
|
||||
Syscall::SC_mknod_params params { { pathname, strlen(pathname) }, mode, dev };
|
||||
int rc = syscall(SC_mknod, ¶ms);
|
||||
__RETURN_WITH_ERRNO(rc, rc, -1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue