mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 14:05:08 +00:00
Kernel: Use KResult in unlink() and rmdir().
This commit is contained in:
parent
ce53b6fd0f
commit
5b27f11b97
11 changed files with 54 additions and 92 deletions
|
@ -2129,20 +2129,14 @@ int Process::sys$unlink(const char* pathname)
|
|||
{
|
||||
if (!validate_read_str(pathname))
|
||||
return -EFAULT;
|
||||
int error;
|
||||
if (!VFS::the().unlink(String(pathname), cwd_inode(), error))
|
||||
return error;
|
||||
return 0;
|
||||
return VFS::the().unlink(String(pathname), cwd_inode());
|
||||
}
|
||||
|
||||
int Process::sys$rmdir(const char* pathname)
|
||||
{
|
||||
if (!validate_read_str(pathname))
|
||||
return -EFAULT;
|
||||
int error;
|
||||
if (!VFS::the().rmdir(String(pathname), cwd_inode(), error))
|
||||
return error;
|
||||
return 0;
|
||||
return VFS::the().rmdir(String(pathname), cwd_inode());
|
||||
}
|
||||
|
||||
int Process::sys$read_tsc(dword* lsw, dword* msw)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue