diff options
author | sin-ack <sin-ack@users.noreply.github.com> | 2022-10-01 11:36:24 +0000 |
---|---|---|
committer | Andrew Kaster <andrewdkaster@gmail.com> | 2022-12-11 19:55:37 -0700 |
commit | eb5389e933bec98735e71c3bab3706841647af48 (patch) | |
tree | fb76f67326b57891e7ed4531c0a582a04157405b /Kernel/Syscalls/mkdir.cpp | |
parent | 6445a706cf9a6be799b9fc8ae7b724ebc450b55b (diff) | |
download | serenity-eb5389e933bec98735e71c3bab3706841647af48.zip |
Kernel+LibC+LibCore: Implement `mkdirat(2)`
Diffstat (limited to 'Kernel/Syscalls/mkdir.cpp')
-rw-r--r-- | Kernel/Syscalls/mkdir.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/Syscalls/mkdir.cpp b/Kernel/Syscalls/mkdir.cpp index 7cd0de8cbd..e614316c8b 100644 --- a/Kernel/Syscalls/mkdir.cpp +++ b/Kernel/Syscalls/mkdir.cpp @@ -10,12 +10,12 @@ namespace Kernel { -ErrorOr<FlatPtr> Process::sys$mkdir(Userspace<char const*> user_path, size_t path_length, mode_t mode) +ErrorOr<FlatPtr> Process::sys$mkdir(int dirfd, Userspace<char const*> user_path, size_t path_length, mode_t mode) { VERIFY_NO_PROCESS_BIG_LOCK(this); TRY(require_promise(Pledge::cpath)); auto path = TRY(get_syscall_path_argument(user_path, path_length)); - TRY(VirtualFileSystem::the().mkdir(credentials(), path->view(), mode & ~umask(), current_directory())); + TRY(VirtualFileSystem::the().mkdir(credentials(), path->view(), mode & ~umask(), TRY(custody_for_dirfd(dirfd)))); return 0; } } |