mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-03 08:08:43 +00:00
Kernel: Use TRY() in sys$mkdir()
This commit is contained in:
parent
e899ea459c
commit
2658ab4a80
Notes:
sideshowbarker
2024-07-18 04:42:06 +09:00
Author: https://github.com/awesomekling
Commit: 2658ab4a80
1 changed files with 2 additions and 4 deletions
|
@ -14,9 +14,7 @@ KResultOr<FlatPtr> Process::sys$mkdir(Userspace<const char*> user_path, size_t p
|
|||
{
|
||||
VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this)
|
||||
REQUIRE_PROMISE(cpath);
|
||||
auto path = get_syscall_path_argument(user_path, path_length);
|
||||
if (path.is_error())
|
||||
return path.error();
|
||||
return VirtualFileSystem::the().mkdir(path.value()->view(), mode & ~umask(), current_directory());
|
||||
auto path = TRY(get_syscall_path_argument(user_path, path_length));
|
||||
return VirtualFileSystem::the().mkdir(path->view(), mode & ~umask(), current_directory());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue