From: Helge Deller Date: Fri, 24 Apr 2020 22:00:33 +0000 (+0200) Subject: linux-user: return target error codes for socket() and prctl() X-Git-Tag: qemu-xen-4.15.0~154^2~17 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=538fabcb46b956b65247b4e8cf701b63a58b70cc;p=qemu-xen.git linux-user: return target error codes for socket() and prctl() Return target error codes instead of host error codes. Signed-off-by: Helge Deller Reviewed-by: Laurent Vivier Message-Id: <20200424220033.GA28140@ls3530.fritz.box> Signed-off-by: Laurent Vivier --- diff --git a/linux-user/syscall.c b/linux-user/syscall.c index e89b815ce9..fd5c4f1d73 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)