linux-user: Return correct errno for unsupported netlink socket
PATCH 1/1 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 <[email protected]>
--- linux-user/syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
linux-user/syscall.c +1 -1
@@ -1861,7 +1861,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);
Signature · 1 line
1.8.3.2
Hi,
Quoted 3 lines · Ed Swierk
This fixes "Cannot open audit interface - aborting." when the EAFNOSUPPORT errno differs between the target and host architectures (e.g. mips target and
x86_64host).
Thanks, looks good - applied to linux-user tree.
Quoted 21 lines
Signed-off-by Ed Swierk <[email protected]>--- linux-user/syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)linux-user/syscall.c +1
-1@@ -1861,7 +1861,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);Signature · 1 line
1.8.3.2