1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:27:35 +00:00

Kernel+LibC+LibCore: Implement the unlinkat(2) syscall

This commit is contained in:
sin-ack 2022-02-10 11:30:33 +00:00 committed by Brian Gianforcaro
parent a5514fece9
commit bc7c8879c5
7 changed files with 31 additions and 6 deletions

View file

@ -854,7 +854,7 @@ ErrorOr<void> unlink(StringView path)
return Error::from_errno(EFAULT);
#ifdef __serenity__
int rc = syscall(SC_unlink, path.characters_without_null_termination(), path.length());
int rc = syscall(SC_unlink, AT_FDCWD, path.characters_without_null_termination(), path.length(), 0);
HANDLE_SYSCALL_RETURN_VALUE("unlink"sv, rc, {});
#else
String path_string = path;