mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:18:11 +00:00
Kernel: Pass a parameter struct to chown()
This commit is contained in:
parent
29b3d95004
commit
6536a80aa9
4 changed files with 21 additions and 6 deletions
|
@ -27,7 +27,12 @@ int systrace(pid_t pid)
|
|||
|
||||
int chown(const char* pathname, uid_t uid, gid_t gid)
|
||||
{
|
||||
int rc = syscall(SC_chown, pathname, uid, gid);
|
||||
if (!pathname) {
|
||||
errno = EFAULT;
|
||||
return -1;
|
||||
}
|
||||
Syscall::SC_chown_params params { { pathname, strlen(pathname) }, uid, gid };
|
||||
int rc = syscall(SC_chown, ¶ms);
|
||||
__RETURN_WITH_ERRNO(rc, rc, -1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue