mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:07:44 +00:00
Kernel+LibC+LibCore: Implement renameat(2)
Now with the ability to specify different bases for the old and new paths.
This commit is contained in:
parent
eb5389e933
commit
d5fbdf1866
7 changed files with 17 additions and 6 deletions
|
@ -920,7 +920,9 @@ ErrorOr<void> rename(StringView old_path, StringView new_path)
|
|||
|
||||
#ifdef AK_OS_SERENITY
|
||||
Syscall::SC_rename_params params {
|
||||
.olddirfd = AT_FDCWD,
|
||||
.old_path = { old_path.characters_without_null_termination(), old_path.length() },
|
||||
.newdirfd = AT_FDCWD,
|
||||
.new_path = { new_path.characters_without_null_termination(), new_path.length() },
|
||||
};
|
||||
int rc = syscall(SC_rename, ¶ms);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue