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>
This commit is contained in:
Laurent Vivier 2016-05-22 18:56:20 +02:00 committed by Riku Voipio
parent 6c5b5645ae
commit b265620bfb
1 changed files with 5 additions and 1 deletions

View File

@ -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();
}