mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:07:43 +00:00
Kernel: Pass characters+length to readlink()
Note that I'm developing some helper types in the Syscall namespace as I go here. Once I settle on some nice types, I will convert all the other syscalls to use them as well.
This commit is contained in:
parent
5c3c2a9bac
commit
0695ff8282
4 changed files with 37 additions and 12 deletions
|
@ -326,7 +326,8 @@ int gethostname(char* buffer, size_t size)
|
|||
|
||||
ssize_t readlink(const char* path, char* buffer, size_t size)
|
||||
{
|
||||
int rc = syscall(SC_readlink, path, buffer, size);
|
||||
Syscall::SC_readlink_params params { { path, strlen(path) }, { buffer, size } };
|
||||
int rc = syscall(SC_readlink, ¶ms);
|
||||
__RETURN_WITH_ERRNO(rc, rc, -1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue