]> git.proxmox.com Git - mirror_qemu.git/commitdiff
linux-user: implement OFD locks
authorAndreas Schwab <schwab@suse.de>
Mon, 25 May 2020 07:59:28 +0000 (09:59 +0200)
committerLaurent Vivier <laurent@vivier.eu>
Fri, 5 Jun 2020 19:23:22 +0000 (21:23 +0200)
Signed-off-by: Andreas Schwab <schwab@suse.de>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <mvm7dx0cun3.fsf@suse.de>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
linux-user/generic/fcntl.h
linux-user/syscall.c

index 9f727d4df2c8e9a4ec9d20535a69e98c6a9157c0..c85c5b9fed65b7a7d02e2465792886e2809340c5 100644 (file)
 #define TARGET_F_SETLKW64      14
 #endif
 
+#define TARGET_F_OFD_GETLK     36
+#define TARGET_F_OFD_SETLK     37
+#define TARGET_F_OFD_SETLKW    38
+
 #ifndef TARGET_F_SETOWN_EX
 #define TARGET_F_SETOWN_EX     15
 #define TARGET_F_GETOWN_EX     16
index 9ac3af20c176ffcaaefab79e2d2a3e21b7457b21..2d8125fa53c6f9821c158c748dc5cfba05788916 100644 (file)
@@ -6098,6 +6098,9 @@ static int target_to_host_fcntl_cmd(int cmd)
     case TARGET_F_SETFD:
     case TARGET_F_GETFL:
     case TARGET_F_SETFL:
+    case TARGET_F_OFD_GETLK:
+    case TARGET_F_OFD_SETLK:
+    case TARGET_F_OFD_SETLKW:
         ret = cmd;
         break;
     case TARGET_F_GETLK:
@@ -6383,6 +6386,7 @@ static abi_long do_fcntl(int fd, int cmd, abi_ulong arg)
         break;
 
     case TARGET_F_GETLK64:
+    case TARGET_F_OFD_GETLK:
         ret = copy_from_user_flock64(&fl64, arg);
         if (ret) {
             return ret;
@@ -6394,6 +6398,8 @@ static abi_long do_fcntl(int fd, int cmd, abi_ulong arg)
         break;
     case TARGET_F_SETLK64:
     case TARGET_F_SETLKW64:
+    case TARGET_F_OFD_SETLK:
+    case TARGET_F_OFD_SETLKW:
         ret = copy_from_user_flock64(&fl64, arg);
         if (ret) {
             return ret;