From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60898) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b4WgK-0007nR-Al for qemu-devel@nongnu.org; Sun, 22 May 2016 12:56:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b4WgG-0004sC-5K for qemu-devel@nongnu.org; Sun, 22 May 2016 12:56:47 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:51417) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b4WgF-0004s5-RH for qemu-devel@nongnu.org; Sun, 22 May 2016 12:56:44 -0400 From: Laurent Vivier Date: Sun, 22 May 2016 18:56:20 +0200 Message-Id: <1463936181-23683-3-git-send-email-laurent@vivier.eu> In-Reply-To: <1463936181-23683-1-git-send-email-laurent@vivier.eu> References: <1463936181-23683-1-git-send-email-laurent@vivier.eu> Subject: [Qemu-devel] [PATCH v2 2/3] linux-user: support netlink protocol NETLINK_KOBJECT_UEVENT List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Riku Voipio Cc: qemu-devel@nongnu.org, Peter Maydell , Laurent Vivier This is the protocol used by udevd to manage kernel events. Signed-off-by: Laurent Vivier --- v2: Check domain before opening socket linux-user/syscall.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 3f1b2cc..ff63bf5 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -2679,7 +2679,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; } @@ -2701,6 +2702,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(); } -- 2.5.5