All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] linux-user: return target error codes for socket() and prctl()
@ 2020-04-24 22:00 Helge Deller
  2020-04-25  8:09 ` Laurent Vivier
  2020-05-27 14:32 ` Laurent Vivier
  0 siblings, 2 replies; 3+ messages in thread
From: Helge Deller @ 2020-04-24 22:00 UTC (permalink / raw)
  To: Riku Voipio, Laurent Vivier, qemu-devel

Return target error codes instead of host error codes.

Signed-off-by: Helge Deller <deller@gmx.de>

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)


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] linux-user: return target error codes for socket() and prctl()
  2020-04-24 22:00 [PATCH] linux-user: return target error codes for socket() and prctl() Helge Deller
@ 2020-04-25  8:09 ` Laurent Vivier
  2020-05-27 14:32 ` Laurent Vivier
  1 sibling, 0 replies; 3+ messages in thread
From: Laurent Vivier @ 2020-04-25  8:09 UTC (permalink / raw)
  To: Helge Deller, Riku Voipio, qemu-devel

Le 25/04/2020 à 00:00, Helge Deller a écrit :
> Return target error codes instead of host error codes.
> 
> Signed-off-by: Helge Deller <deller@gmx.de>
> 
> 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)
> 

Reviewed-by: Laurent Vivier <laurent@vivier.eu>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] linux-user: return target error codes for socket() and prctl()
  2020-04-24 22:00 [PATCH] linux-user: return target error codes for socket() and prctl() Helge Deller
  2020-04-25  8:09 ` Laurent Vivier
@ 2020-05-27 14:32 ` Laurent Vivier
  1 sibling, 0 replies; 3+ messages in thread
From: Laurent Vivier @ 2020-05-27 14:32 UTC (permalink / raw)
  To: Helge Deller, Riku Voipio, qemu-devel

Le 25/04/2020 à 00:00, Helge Deller a écrit :
> Return target error codes instead of host error codes.
> 
> Signed-off-by: Helge Deller <deller@gmx.de>
> 
> 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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-05-27 14:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-24 22:00 [PATCH] linux-user: return target error codes for socket() and prctl() Helge Deller
2020-04-25  8:09 ` Laurent Vivier
2020-05-27 14:32 ` 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.