diff mbox

[PULL,17/18] linux-user: Return correct errno for unsupported netlink socket

Message ID 4b4d97303075e77471e11c1d28e085af0358e7e9.1402317549.git.riku.voipio@linaro.org
State Superseded
Headers show

Commit Message

Riku Voipio June 9, 2014, 12:46 p.m. UTC
From: Ed Swierk <eswierk@skyportsystems.com>

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 <eswierk@skyportsystems.com>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
---
 linux-user/syscall.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 840ced1..c134c32 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);