mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 12:55:09 +00:00
Kernel+Userland: Add the rename() syscall along with a basic /bin/mv.
This commit is contained in:
parent
71b6436552
commit
37ae00a4dd
11 changed files with 99 additions and 2 deletions
|
@ -2445,3 +2445,12 @@ int Process::sys$donate(int tid)
|
|||
Scheduler::donate_to(beneficiary, "sys$donate");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int Process::sys$rename(const char* oldpath, const char* newpath)
|
||||
{
|
||||
if (!validate_read_str(oldpath))
|
||||
return -EFAULT;
|
||||
if (!validate_read_str(newpath))
|
||||
return -EFAULT;
|
||||
return VFS::the().rename(String(oldpath), String(newpath), cwd_inode());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue