linux-user: return target error codes for socket() and prctl()
authorHelge Deller <deller@gmx.de>
Fri, 24 Apr 2020 22:00:33 +0000 (00:00 +0200)
committerLaurent Vivier <laurent@vivier.eu>
Wed, 27 May 2020 14:32:09 +0000 (16:32 +0200)
Return target error codes instead of host error codes.

Signed-off-by: Helge Deller <deller@gmx.de>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20200424220033.GA28140@ls3530.fritz.box>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
linux-user/syscall.c

index e89b815ce983caf99c74acc92e0796bab9d4b65e..fd5c4f1d73e66ba5bd412488df042e1fdafa01b0 100644 (file)
@@ -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)