diff mbox

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

Message ID 480eda2eda7c464e252f17ac87ec61bccc14f285.1403016610.git.riku.voipio@linaro.org
State New
Headers show

Commit Message

Riku Voipio June 17, 2014, 2:56 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);