1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 05:08:13 +00:00

Kernel: Use KResult in link().

This commit is contained in:
Andreas Kling 2019-02-27 15:31:26 +01:00
parent 5b27f11b97
commit 60d0a48be5
10 changed files with 41 additions and 54 deletions

View file

@ -2119,10 +2119,7 @@ int Process::sys$link(const char* old_path, const char* new_path)
return -EFAULT;
if (!validate_read_str(new_path))
return -EFAULT;
int error;
if (!VFS::the().link(String(old_path), String(new_path), cwd_inode(), error))
return error;
return 0;
return VFS::the().link(String(old_path), String(new_path), cwd_inode());
}
int Process::sys$unlink(const char* pathname)