mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 20:28:11 +00:00
Kernel: Use TRY() in sys$mkdir()
This commit is contained in:
parent
e899ea459c
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