aboutsummaryrefslogtreecommitdiff
path: root/linux-user
diff options
context:
space:
mode:
authorLaurent Vivier <laurent@vivier.eu>2016-05-22 18:56:20 +0200
committerRiku Voipio <riku.voipio@linaro.org>2016-06-07 11:34:36 +0300
commitb265620bfbe300528247b31de54bacfd513109e8 (patch)
treed899f07feef27dfe188ebd00c771f34aa4138451 /linux-user
parent6c5b5645ae0b73c052df962e18e48d87bb7385e0 (diff)
downloadqemu-b265620bfbe300528247b31de54bacfd513109e8.zip
qemu-b265620bfbe300528247b31de54bacfd513109e8.tar.gz
qemu-b265620bfbe300528247b31de54bacfd513109e8.tar.bz2
linux-user: support netlink protocol NETLINK_KOBJECT_UEVENT
This is the protocol used by udevd to manage kernel events. Signed-off-by: Laurent Vivier <laurent@vivier.eu> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Diffstat (limited to 'linux-user')
-rw-r--r--linux-user/syscall.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 3e4895e..584aecc 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -2718,7 +2718,8 @@ static abi_long do_socket(int domain, int type, int protocol)
}
if (domain == PF_NETLINK &&
- protocol != NETLINK_ROUTE) {
+ !(protocol == NETLINK_ROUTE ||
+ protocol == NETLINK_KOBJECT_UEVENT)) {
return -EPFNOSUPPORT;
}
@@ -2740,6 +2741,9 @@ static abi_long do_socket(int domain, int type, int protocol)
case NETLINK_ROUTE:
fd_trans_register(ret, &target_netlink_route_trans);
break;
+ case NETLINK_KOBJECT_UEVENT:
+ /* nothing to do: messages are strings */
+ break;
default:
g_assert_not_reached();
}