qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] linux-user: return target error codes for socket() and prctl


From: Laurent Vivier
Subject: Re: [PATCH] linux-user: return target error codes for socket() and prctl()
Date: Wed, 27 May 2020 16:32:19 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0

Le 25/04/2020 à 00:00, Helge Deller a écrit :
> Return target error codes instead of host error codes.
> 
> Signed-off-by: Helge Deller <address@hidden>
> 
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index 05f03919ff..655a86fa45 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -2987,7 +2987,7 @@ static abi_long do_socket(int domain, int type, int 
> protocol)
>  #endif
>           protocol == NETLINK_KOBJECT_UEVENT ||
>           protocol == NETLINK_AUDIT)) {
> -        return -EPFNOSUPPORT;
> +        return -TARGET_EPFNOSUPPORT;
>      }
> 
>      if (domain == AF_PACKET ||
> @@ -5856,7 +5856,7 @@ static abi_long do_get_thread_area(CPUX86State *env, 
> abi_ulong ptr)
> 
>  abi_long do_arch_prctl(CPUX86State *env, int code, abi_ulong addr)
>  {
> -    return -ENOSYS;
> +    return -TARGET_ENOSYS;
>  }
>  #else
>  abi_long do_arch_prctl(CPUX86State *env, int code, abi_ulong addr)
> 

Applied to my linux-user branch.

Thanks,
Laurent



reply via email to

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