On 1/13/26 23:59, Michael Tokarev wrote:
> splice() &Co are defined since linux 2.6.17.
> Assume it is always present.
>
> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
> ---
> linux-user/syscall.c | 15 +++------------
> 1 file changed, 3 insertions(+), 12 deletions(-)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Separately, I wonder if these require safe_* versions to properly handle restart from
signal delivery during a blocking operation.
r~
>
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index 67ad681098..9cc9ed2fbc 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -13450,15 +13450,9 @@ static abi_long do_syscall1(CPUArchState *cpu_env, int num, abi_long arg1,
> return ret;
> #endif
>
> -#ifdef CONFIG_SPLICE
> -#ifdef TARGET_NR_tee
> case TARGET_NR_tee:
> - {
> - ret = get_errno(tee(arg1,arg2,arg3,arg4));
> - }
> + ret = get_errno(tee(arg1, arg2, arg3, arg4));
> return ret;
> -#endif
> -#ifdef TARGET_NR_splice
> case TARGET_NR_splice:
> {
> loff_t loff_in, loff_out;
> @@ -13488,9 +13482,7 @@ static abi_long do_syscall1(CPUArchState *cpu_env, int num, abi_long arg1,
> }
> }
> return ret;
> -#endif
> -#ifdef TARGET_NR_vmsplice
> - case TARGET_NR_vmsplice:
> + case TARGET_NR_vmsplice:
> {
> struct iovec *vec = lock_iovec(VERIFY_READ, arg2, arg3, 1);
> if (vec != NULL) {
> @@ -13501,8 +13493,7 @@ static abi_long do_syscall1(CPUArchState *cpu_env, int num, abi_long arg1,
> }
> }
> return ret;
> -#endif
> -#endif /* CONFIG_SPLICE */
> +
> #ifdef CONFIG_EVENTFD
> #if defined(TARGET_NR_eventfd)
> case TARGET_NR_eventfd: