From: Ed Swierk Date: Tue, 6 May 2014 03:04:45 +0000 (-0700) Subject: linux-user: Return correct errno for unsupported netlink socket X-Git-Tag: qemu-xen-4.6.0-rc1~380^2~1 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=480eda2eda7c464e252f17ac87ec61bccc14f285;p=qemu-upstream-4.6-testing.git linux-user: Return correct errno for unsupported netlink socket This fixes "Cannot open audit interface - aborting." when the EAFNOSUPPORT errno differs between the target and host architectures (e.g. mips target and x86_64 host). Signed-off-by: Ed Swierk Signed-off-by: Riku Voipio --- diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 840ced1fd..c134c32d6 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -1856,7 +1856,7 @@ static abi_long do_socket(int domain, int type, int protocol) } if (domain == PF_NETLINK) - return -EAFNOSUPPORT; /* do not NETLINK socket connections possible */ + return -TARGET_EAFNOSUPPORT; ret = get_errno(socket(domain, type, protocol)); if (ret >= 0) { ret = sock_flags_fixup(ret, target_type);