mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:47:35 +00:00
Kernel: Pass a parameter struct to symlink()
This commit is contained in:
parent
c97bfbd609
commit
46830a0c32
4 changed files with 23 additions and 8 deletions
|
@ -361,7 +361,12 @@ int unlink(const char* pathname)
|
|||
|
||||
int symlink(const char* target, const char* linkpath)
|
||||
{
|
||||
int rc = syscall(SC_symlink, target, linkpath);
|
||||
if (!target || !linkpath) {
|
||||
errno = EFAULT;
|
||||
return -1;
|
||||
}
|
||||
Syscall::SC_symlink_params params { { target, strlen(target) }, { linkpath, strlen(linkpath) } };
|
||||
int rc = syscall(SC_symlink, ¶ms);
|
||||
__RETURN_WITH_ERRNO(rc, rc, -1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue