mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
Kernel: Use TRY() in sys$access()
This commit is contained in:
parent
c1c774da91
commit
4a2b0f6bec
Notes:
sideshowbarker
2024-07-18 04:42:37 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/4a2b0f6bece
1 changed files with 2 additions and 4 deletions
|
@ -14,10 +14,8 @@ KResultOr<FlatPtr> Process::sys$access(Userspace<const char*> user_path, size_t
|
|||
{
|
||||
VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this);
|
||||
REQUIRE_PROMISE(rpath);
|
||||
auto path = get_syscall_path_argument(user_path, path_length);
|
||||
if (path.is_error())
|
||||
return path.error();
|
||||
return VirtualFileSystem::the().access(path.value()->view(), mode, current_directory());
|
||||
auto path = TRY(get_syscall_path_argument(user_path, path_length));
|
||||
return VirtualFileSystem::the().access(path->view(), mode, current_directory());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue