summaryrefslogtreecommitdiff
path: root/Libraries
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2020-01-10 20:13:23 +0100
committerAndreas Kling <awesomekling@gmail.com>2020-01-10 20:13:23 +0100
commit0695ff8282eca40ab08300c5a9be8716d453aee6 (patch)
treec1ac7da88ef512a7572d0eb973e0675f72bd2de6 /Libraries
parent5c3c2a9bacf75831716bbe028f84d9f1cd4dad74 (diff)
downloadserenity-0695ff8282eca40ab08300c5a9be8716d453aee6.zip
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.
Diffstat (limited to 'Libraries')
-rw-r--r--Libraries/LibC/unistd.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Libraries/LibC/unistd.cpp b/Libraries/LibC/unistd.cpp
index 2f4debf7b3..658291b478 100644
--- a/Libraries/LibC/unistd.cpp
+++ b/Libraries/LibC/unistd.cpp
@@ -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, &params);
__RETURN_WITH_ERRNO(rc, rc, -1);
}