mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-28 12:18:25 +00:00
Kernel: Pass a parameter struct to rename()
This commit is contained in:
@@ -510,7 +510,12 @@ int fclose(FILE* stream)
|
||||
|
||||
int rename(const char* oldpath, const char* newpath)
|
||||
{
|
||||
int rc = syscall(SC_rename, oldpath, newpath);
|
||||
if (!oldpath || !newpath) {
|
||||
errno = EFAULT;
|
||||
return -1;
|
||||
}
|
||||
Syscall::SC_rename_params params { { oldpath, strlen(oldpath) }, { newpath, strlen(newpath) } };
|
||||
int rc = syscall(SC_rename, ¶ms);
|
||||
__RETURN_WITH_ERRNO(rc, rc, -1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user