qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL 03/44] linux-user: support netlink protocol NETLINK_K


From: riku . voipio
Subject: [Qemu-devel] [PULL 03/44] linux-user: support netlink protocol NETLINK_KOBJECT_UEVENT
Date: Wed, 8 Jun 2016 16:29:44 +0300

From: Laurent Vivier <address@hidden>

This is the protocol used by udevd to manage kernel events.

Signed-off-by: Laurent Vivier <address@hidden>
Signed-off-by: Riku Voipio <address@hidden>
---
 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 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();
             }
-- 
2.1.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]