linux-user: return target error codes for socket() and prctl()
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>
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index e89b815..fd5c4f1 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -2987,7 +2987,7 @@
#endif
protocol == NETLINK_KOBJECT_UEVENT ||
protocol == NETLINK_AUDIT)) {
- return -EPFNOSUPPORT;
+ return -TARGET_EPFNOSUPPORT;
}
if (domain == AF_PACKET ||
@@ -5856,7 +5856,7 @@
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)