* [PATCH] linux-user: implement OFD locks
@ 2020-05-25 7:59 Andreas Schwab
2020-05-28 10:58 ` Laurent Vivier
2020-05-28 11:00 ` Laurent Vivier
0 siblings, 2 replies; 3+ messages in thread
From: Andreas Schwab @ 2020-05-25 7:59 UTC (permalink / raw)
To: qemu-devel; +Cc: riku.voipio, laurent
Signed-off-by: Andreas Schwab <schwab@suse.de>
---
linux-user/generic/fcntl.h | 4 ++++
linux-user/syscall.c | 6 ++++++
2 files changed, 10 insertions(+)
diff --git a/linux-user/generic/fcntl.h b/linux-user/generic/fcntl.h
index 9f727d4df2..c85c5b9fed 100644
--- a/linux-user/generic/fcntl.h
+++ b/linux-user/generic/fcntl.h
@@ -99,6 +99,10 @@
#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
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 7eac6b7d47..492450e77d 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -6097,6 +6097,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:
@@ -6382,6 +6385,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;
@@ -6393,6 +6397,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;
--
2.26.2
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] linux-user: implement OFD locks
2020-05-25 7:59 [PATCH] linux-user: implement OFD locks Andreas Schwab
@ 2020-05-28 10:58 ` Laurent Vivier
2020-05-28 11:00 ` Laurent Vivier
1 sibling, 0 replies; 3+ messages in thread
From: Laurent Vivier @ 2020-05-28 10:58 UTC (permalink / raw)
To: Andreas Schwab, qemu-devel; +Cc: riku.voipio
Le 25/05/2020 à 09:59, Andreas Schwab a écrit :
> Signed-off-by: Andreas Schwab <schwab@suse.de>
> ---
> linux-user/generic/fcntl.h | 4 ++++
> linux-user/syscall.c | 6 ++++++
> 2 files changed, 10 insertions(+)
>
> diff --git a/linux-user/generic/fcntl.h b/linux-user/generic/fcntl.h
> index 9f727d4df2..c85c5b9fed 100644
> --- a/linux-user/generic/fcntl.h
> +++ b/linux-user/generic/fcntl.h
> @@ -99,6 +99,10 @@
> #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
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index 7eac6b7d47..492450e77d 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -6097,6 +6097,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:
> @@ -6382,6 +6385,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;
> @@ -6393,6 +6397,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;
>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] linux-user: implement OFD locks
2020-05-25 7:59 [PATCH] linux-user: implement OFD locks Andreas Schwab
2020-05-28 10:58 ` Laurent Vivier
@ 2020-05-28 11:00 ` Laurent Vivier
1 sibling, 0 replies; 3+ messages in thread
From: Laurent Vivier @ 2020-05-28 11:00 UTC (permalink / raw)
To: Andreas Schwab, qemu-devel; +Cc: riku.voipio
Le 25/05/2020 à 09:59, Andreas Schwab a écrit :
> Signed-off-by: Andreas Schwab <schwab@suse.de>
> ---
> linux-user/generic/fcntl.h | 4 ++++
> linux-user/syscall.c | 6 ++++++
> 2 files changed, 10 insertions(+)
>
> diff --git a/linux-user/generic/fcntl.h b/linux-user/generic/fcntl.h
> index 9f727d4df2..c85c5b9fed 100644
> --- a/linux-user/generic/fcntl.h
> +++ b/linux-user/generic/fcntl.h
> @@ -99,6 +99,10 @@
> #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
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index 7eac6b7d47..492450e77d 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -6097,6 +6097,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:
> @@ -6382,6 +6385,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;
> @@ -6393,6 +6397,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;
>
Applied to my linux-user branch.
Thanks,
Laurent
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-05-28 11:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-25 7:59 [PATCH] linux-user: implement OFD locks Andreas Schwab
2020-05-28 10:58 ` Laurent Vivier
2020-05-28 11:00 ` Laurent Vivier
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.