From ffe43322ffd7e0dad22e1ba456bd213165a9b264 Mon Sep 17 00:00:00 2001 From: Sergey Bugaev Date: Sat, 23 Feb 2019 15:06:12 +0300 Subject: [PATCH] Stub out fcntl(F_*LCK) --- src/kernel/emulation/linux/fcntl/fcntl.c | 5 +++++ src/kernel/emulation/linux/fcntl/fcntl.h | 12 ++++++++++++ 2 files changed, 17 insertions(+) diff --git a/src/kernel/emulation/linux/fcntl/fcntl.c b/src/kernel/emulation/linux/fcntl/fcntl.c index e222ba71f..53ef8c24d 100644 --- a/src/kernel/emulation/linux/fcntl/fcntl.c +++ b/src/kernel/emulation/linux/fcntl/fcntl.c @@ -73,6 +73,11 @@ long sys_fcntl_nocancel(int fd, int cmd, long arg) return 0; } + case F_SETLK: + case F_SETLKW: + case F_GETLK: + // TODO + return 0; // TODO: implement remaining commands default: return -EINVAL; diff --git a/src/kernel/emulation/linux/fcntl/fcntl.h b/src/kernel/emulation/linux/fcntl/fcntl.h index 19f5d68ed..54ddf103c 100644 --- a/src/kernel/emulation/linux/fcntl/fcntl.h +++ b/src/kernel/emulation/linux/fcntl/fcntl.h @@ -46,6 +46,18 @@ enum { F_GETPATH = 50, }; +enum { + LINUX_F_RDLCK = 0, + LINUX_F_WRLCK, + LINUX_F_UNLCK, +}; + +enum { + F_RDLCK = 1, + F_UNLCK, + F_WRLCK, +}; + #ifndef FD_CLOEXEC # define FD_CLOEXEC 1 #endif -- 2.51.2