linux-user: Return correct errno for unsupported netlink socket
authorEd Swierk <eswierk@skyportsystems.com>
Tue, 6 May 2014 03:04:45 +0000 (20:04 -0700)
committerRiku Voipio <riku.voipio@linaro.org>
Tue, 17 Jun 2014 06:21:41 +0000 (09:21 +0300)
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

index 840ced1fdadc000dc65c6cd5d896e597473d88d9..c134c32d6fd15aa67761595a1a18be9909fa6fc8 100644 (file)
@@ -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);