mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:47:44 +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)
|
VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this)
|
||||||
REQUIRE_PROMISE(cpath);
|
REQUIRE_PROMISE(cpath);
|
||||||
auto path = get_syscall_path_argument(user_path, path_length);
|
auto path = TRY(get_syscall_path_argument(user_path, path_length));
|
||||||
if (path.is_error())
|
return VirtualFileSystem::the().mkdir(path->view(), mode & ~umask(), current_directory());
|
||||||
return path.error();
|
|
||||||
return VirtualFileSystem::the().mkdir(path.value()->view(), mode & ~umask(), current_directory());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue