* [PATCH] linux-user: Remove obsolete F_SHLCK and F_WRLCK translation
@ 2020-10-28 3:27 Michael Forney
2021-01-14 22:36 ` [PATCH v2] linux-user: Remove obsolete F_SHLCK and F_EXLCK translation Michael Forney
0 siblings, 1 reply; 4+ messages in thread
From: Michael Forney @ 2020-10-28 3:27 UTC (permalink / raw)
To: qemu-devel
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>
---
linux-user/alpha/target_fcntl.h | 2 --
linux-user/generic/fcntl.h | 5 -----
linux-user/syscall.c | 2 --
3 files changed, 9 deletions(-)
diff --git a/linux-user/alpha/target_fcntl.h b/linux-user/alpha/target_fcntl.h
index 2617e73472..e16ed1d415 100644
--- a/linux-user/alpha/target_fcntl.h
+++ b/linux-user/alpha/target_fcntl.h
@@ -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
diff --git a/linux-user/generic/fcntl.h b/linux-user/generic/fcntl.h
index c85c5b9fed..4568d1f42b 100644
--- a/linux-user/generic/fcntl.h
+++ b/linux-user/generic/fcntl.h
@@ -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
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 897d20c076..56a8380dda 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -6621,8 +6621,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)
--
2.29.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v2] linux-user: Remove obsolete F_SHLCK and F_EXLCK translation
2020-10-28 3:27 [PATCH] linux-user: Remove obsolete F_SHLCK and F_WRLCK translation Michael Forney
@ 2021-01-14 22:36 ` Michael Forney
2021-01-18 15:32 ` Laurent Vivier
2021-01-18 17:33 ` Laurent Vivier
0 siblings, 2 replies; 4+ messages in thread
From: Michael Forney @ 2021-01-14 22:36 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial
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>
---
Changes since v1: fixed typo in commit message, resend to qemu-trivial.
linux-user/alpha/target_fcntl.h | 2 --
linux-user/generic/fcntl.h | 5 -----
linux-user/syscall.c | 2 --
3 files changed, 9 deletions(-)
diff --git a/linux-user/alpha/target_fcntl.h b/linux-user/alpha/target_fcntl.h
index 2617e73472..e16ed1d415 100644
--- a/linux-user/alpha/target_fcntl.h
+++ b/linux-user/alpha/target_fcntl.h
@@ -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
diff --git a/linux-user/generic/fcntl.h b/linux-user/generic/fcntl.h
index c85c5b9fed..4568d1f42b 100644
--- a/linux-user/generic/fcntl.h
+++ b/linux-user/generic/fcntl.h
@@ -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
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index d182890ff0..f238edf715 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -6664,8 +6664,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)
--
2.30.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] linux-user: Remove obsolete F_SHLCK and F_EXLCK translation
2021-01-14 22:36 ` [PATCH v2] linux-user: Remove obsolete F_SHLCK and F_EXLCK translation Michael Forney
@ 2021-01-18 15:32 ` Laurent Vivier
2021-01-18 17:33 ` Laurent Vivier
1 sibling, 0 replies; 4+ messages in thread
From: Laurent Vivier @ 2021-01-18 15:32 UTC (permalink / raw)
To: Michael Forney, qemu-devel; +Cc: qemu-trivial
Le 14/01/2021 à 23:36, Michael Forney a écrit :
> 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>
> ---
> Changes since v1: fixed typo in commit message, resend to qemu-trivial.
>
> linux-user/alpha/target_fcntl.h | 2 --
> linux-user/generic/fcntl.h | 5 -----
> linux-user/syscall.c | 2 --
> 3 files changed, 9 deletions(-)
>
> diff --git a/linux-user/alpha/target_fcntl.h b/linux-user/alpha/target_fcntl.h
> index 2617e73472..e16ed1d415 100644
> --- a/linux-user/alpha/target_fcntl.h
> +++ b/linux-user/alpha/target_fcntl.h
> @@ -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
> diff --git a/linux-user/generic/fcntl.h b/linux-user/generic/fcntl.h
> index c85c5b9fed..4568d1f42b 100644
> --- a/linux-user/generic/fcntl.h
> +++ b/linux-user/generic/fcntl.h
> @@ -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
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index d182890ff0..f238edf715 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -6664,8 +6664,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)
>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] linux-user: Remove obsolete F_SHLCK and F_EXLCK translation
2021-01-14 22:36 ` [PATCH v2] linux-user: Remove obsolete F_SHLCK and F_EXLCK translation Michael Forney
2021-01-18 15:32 ` Laurent Vivier
@ 2021-01-18 17:33 ` Laurent Vivier
1 sibling, 0 replies; 4+ messages in thread
From: Laurent Vivier @ 2021-01-18 17:33 UTC (permalink / raw)
To: Michael Forney, qemu-devel; +Cc: qemu-trivial
Le 14/01/2021 à 23:36, Michael Forney a écrit :
> 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>
> ---
> Changes since v1: fixed typo in commit message, resend to qemu-trivial.
>
> linux-user/alpha/target_fcntl.h | 2 --
> linux-user/generic/fcntl.h | 5 -----
> linux-user/syscall.c | 2 --
> 3 files changed, 9 deletions(-)
>
> diff --git a/linux-user/alpha/target_fcntl.h b/linux-user/alpha/target_fcntl.h
> index 2617e73472..e16ed1d415 100644
> --- a/linux-user/alpha/target_fcntl.h
> +++ b/linux-user/alpha/target_fcntl.h
> @@ -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
> diff --git a/linux-user/generic/fcntl.h b/linux-user/generic/fcntl.h
> index c85c5b9fed..4568d1f42b 100644
> --- a/linux-user/generic/fcntl.h
> +++ b/linux-user/generic/fcntl.h
> @@ -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
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index d182890ff0..f238edf715 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -6664,8 +6664,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)
>
Applied to my linux-user-for-6.0 branch.
Thanks,
Laurent
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-01-18 17:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-28 3:27 [PATCH] linux-user: Remove obsolete F_SHLCK and F_WRLCK translation Michael Forney
2021-01-14 22:36 ` [PATCH v2] linux-user: Remove obsolete F_SHLCK and F_EXLCK translation Michael Forney
2021-01-18 15:32 ` Laurent Vivier
2021-01-18 17:33 ` Laurent Vivier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).