linux-user: Remove obsolete F_SHLCK and F_EXLCK translation
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>
This commit is contained in:
parent
38987eabb1
commit
b1d2e476e9
@ -33,8 +33,6 @@
|
|||||||
#define TARGET_F_RDLCK 1
|
#define TARGET_F_RDLCK 1
|
||||||
#define TARGET_F_WRLCK 2
|
#define TARGET_F_WRLCK 2
|
||||||
#define TARGET_F_UNLCK 8
|
#define TARGET_F_UNLCK 8
|
||||||
#define TARGET_F_EXLCK 16
|
|
||||||
#define TARGET_F_SHLCK 32
|
|
||||||
|
|
||||||
#include "../generic/fcntl.h"
|
#include "../generic/fcntl.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -119,11 +119,6 @@ struct target_f_owner_ex {
|
|||||||
#define TARGET_F_UNLCK 2
|
#define TARGET_F_UNLCK 2
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_F_EXLCK
|
|
||||||
#define TARGET_F_EXLCK 4
|
|
||||||
#define TARGET_F_SHLCK 8
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef TARGET_HAVE_ARCH_STRUCT_FLOCK
|
#ifndef TARGET_HAVE_ARCH_STRUCT_FLOCK
|
||||||
#ifndef TARGET_ARCH_FLOCK_PAD
|
#ifndef TARGET_ARCH_FLOCK_PAD
|
||||||
#define TARGET_ARCH_FLOCK_PAD
|
#define TARGET_ARCH_FLOCK_PAD
|
||||||
|
@ -6679,8 +6679,6 @@ static int target_to_host_fcntl_cmd(int cmd)
|
|||||||
TRANSTBL_CONVERT(F_RDLCK); \
|
TRANSTBL_CONVERT(F_RDLCK); \
|
||||||
TRANSTBL_CONVERT(F_WRLCK); \
|
TRANSTBL_CONVERT(F_WRLCK); \
|
||||||
TRANSTBL_CONVERT(F_UNLCK); \
|
TRANSTBL_CONVERT(F_UNLCK); \
|
||||||
TRANSTBL_CONVERT(F_EXLCK); \
|
|
||||||
TRANSTBL_CONVERT(F_SHLCK); \
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int target_to_host_flock(int type)
|
static int target_to_host_flock(int type)
|
||||||
|
Loading…
Reference in New Issue
Block a user