qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] linux-user: implement OFD locks


From: Laurent Vivier
Subject: Re: [PATCH] linux-user: implement OFD locks
Date: Thu, 28 May 2020 12:58:53 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0

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>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]