Kernel: Use KResult in unlink() and rmdir().

This commit is contained in:
Andreas Kling 2019-02-27 14:11:25 +01:00
commit 5b27f11b97
Notes: sideshowbarker 2024-07-19 15:36:48 +09:00
11 changed files with 54 additions and 92 deletions

View file

@ -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)