mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 05:09:12 +00:00
Kernel+LibC: Implement readlinkat(2)
Co-Authored-By: Daniel Bertalan <dani@danielbertalan.dev>
This commit is contained in:
parent
9850a69cd1
commit
6445a706cf
Notes:
sideshowbarker
2024-07-17 07:08:37 +09:00
Author: https://github.com/sin-ack
Commit: 6445a706cf
Pull-request: https://github.com/SerenityOS/serenity/pull/15428
Reviewed-by: https://github.com/ADKaster ✅
Reviewed-by: https://github.com/AtkinsSJ
Reviewed-by: https://github.com/BertalanD
Reviewed-by: https://github.com/linusg
Reviewed-by: https://github.com/timschumi
6 changed files with 16 additions and 6 deletions
|
@ -1386,8 +1386,9 @@ ErrorOr<DeprecatedString> readlink(StringView pathname)
|
|||
char data[PATH_MAX];
|
||||
#ifdef AK_OS_SERENITY
|
||||
Syscall::SC_readlink_params small_params {
|
||||
{ pathname.characters_without_null_termination(), pathname.length() },
|
||||
{ data, sizeof(data) }
|
||||
.path = { pathname.characters_without_null_termination(), pathname.length() },
|
||||
.buffer = { data, sizeof(data) },
|
||||
.dirfd = AT_FDCWD,
|
||||
};
|
||||
int rc = syscall(SC_readlink, &small_params);
|
||||
HANDLE_SYSCALL_RETURN_VALUE("readlink", rc, DeprecatedString(data, rc));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue