diff options
author | Idan Horowitz <idan.horowitz@gmail.com> | 2022-07-14 02:17:01 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-07-21 16:39:22 +0200 |
commit | 3a80b25ed6fa6aff98ba2d72cb28d66b8e013d4f (patch) | |
tree | 1e86e986bbbb3bec23d7a618eab4a420c1ef1cd4 /Kernel/Syscalls | |
parent | 9db10887a1499db41c1c549cf60a9c0ba27766c0 (diff) | |
download | serenity-3a80b25ed6fa6aff98ba2d72cb28d66b8e013d4f.zip |
Kernel: Support F_SETLKW in fcntl
Diffstat (limited to 'Kernel/Syscalls')
-rw-r--r-- | Kernel/Syscalls/fcntl.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Kernel/Syscalls/fcntl.cpp b/Kernel/Syscalls/fcntl.cpp index 8b9d9b0a95..1fb961116a 100644 --- a/Kernel/Syscalls/fcntl.cpp +++ b/Kernel/Syscalls/fcntl.cpp @@ -45,7 +45,10 @@ ErrorOr<FlatPtr> Process::sys$fcntl(int fd, int cmd, uintptr_t arg) TRY(description->get_flock(Userspace<flock*>(arg))); return 0; case F_SETLK: - TRY(description->apply_flock(Process::current(), Userspace<flock const*>(arg))); + TRY(description->apply_flock(Process::current(), Userspace<flock const*>(arg), ShouldBlock::No)); + return 0; + case F_SETLKW: + TRY(description->apply_flock(Process::current(), Userspace<flock const*>(arg), ShouldBlock::Yes)); return 0; default: return EINVAL; |