linux-user: Support F_ADD_SEALS and F_GET_SEALS fcntls

Also reorder blocks so that they are all in the same order everywhere.

Signed-off-by: Shu-Chun Weng <scw@google.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20201218193213.3566856-2-scw@google.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
This commit is contained in:
Shu-Chun Weng 2020-12-18 11:32:10 -08:00 committed by Laurent Vivier
parent 48202c7124
commit 2bb963ff6b
3 changed files with 50 additions and 13 deletions

View file

@ -6639,6 +6639,14 @@ static int target_to_host_fcntl_cmd(int cmd)
case TARGET_F_GETPIPE_SZ:
ret = F_GETPIPE_SZ;
break;
#endif
#ifdef F_ADD_SEALS
case TARGET_F_ADD_SEALS:
ret = F_ADD_SEALS;
break;
case TARGET_F_GET_SEALS:
ret = F_GET_SEALS;
break;
#endif
default:
ret = -TARGET_EINVAL;
@ -6931,6 +6939,8 @@ static abi_long do_fcntl(int fd, int cmd, abi_ulong arg)
case TARGET_F_GETLEASE:
case TARGET_F_SETPIPE_SZ:
case TARGET_F_GETPIPE_SZ:
case TARGET_F_ADD_SEALS:
case TARGET_F_GET_SEALS:
ret = get_errno(safe_fcntl(fd, host_cmd, arg));
break;