]> git.proxmox.com Git - mirror_qemu.git/commitdiff
linux-user: Remove obsolete F_SHLCK and F_EXLCK translation
authorMichael Forney <mforney@mforney.org>
Thu, 14 Jan 2021 22:36:02 +0000 (14:36 -0800)
committerLaurent Vivier <laurent@vivier.eu>
Thu, 21 Jan 2021 12:27:34 +0000 (13:27 +0100)
These lock types are unsupported by Linux since v2.2[0][1] and
always return EINVAL (except on SPARC up until v2.6, which just
warned).

musl libc does not define these constants, so just remove them from
the translation cases.

[0] https://github.com/mpe/linux-fullhistory/blob/v2.2.0/fs/locks.c#L322-L324
[1] https://github.com/mpe/linux-fullhistory/blob/v2.2.0/fs/locks.c#L429-L445

Signed-off-by: Michael Forney <mforney@mforney.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20210114223602.9004-1-mforney@mforney.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
linux-user/alpha/target_fcntl.h
linux-user/generic/fcntl.h
linux-user/syscall.c

index 2617e73472b748c7357c33c53b86b34ee127c17a..e16ed1d4157f356762a094956f3b43d56c45becd 100644 (file)
@@ -33,8 +33,6 @@
 #define TARGET_F_RDLCK         1
 #define TARGET_F_WRLCK         2
 #define TARGET_F_UNLCK         8
-#define TARGET_F_EXLCK         16
-#define TARGET_F_SHLCK         32
 
 #include "../generic/fcntl.h"
 #endif
index c85c5b9fed65b7a7d02e2465792886e2809340c5..4568d1f42bdd88a38501a04ac666f3f251850446 100644 (file)
@@ -119,11 +119,6 @@ struct target_f_owner_ex {
 #define TARGET_F_UNLCK         2
 #endif
 
-#ifndef TARGET_F_EXLCK
-#define TARGET_F_EXLCK         4
-#define TARGET_F_SHLCK         8
-#endif
-
 #ifndef TARGET_HAVE_ARCH_STRUCT_FLOCK
 #ifndef TARGET_ARCH_FLOCK_PAD
 #define TARGET_ARCH_FLOCK_PAD
index 5d482dcbefd63f47470512b2fa64e849934b8bf5..34760779c8ece7f7a806e4db881ba09b45527259 100644 (file)
@@ -6679,8 +6679,6 @@ static int target_to_host_fcntl_cmd(int cmd)
     TRANSTBL_CONVERT(F_RDLCK); \
     TRANSTBL_CONVERT(F_WRLCK); \
     TRANSTBL_CONVERT(F_UNLCK); \
-    TRANSTBL_CONVERT(F_EXLCK); \
-    TRANSTBL_CONVERT(F_SHLCK); \
     }
 
 static int target_to_host_flock(int type)