]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
linux-user: support netlink protocol NETLINK_KOBJECT_UEVENT
authorLaurent Vivier <laurent@vivier.eu>
Sun, 22 May 2016 16:56:20 +0000 (18:56 +0200)
committerRiku Voipio <riku.voipio@linaro.org>
Tue, 7 Jun 2016 08:34:36 +0000 (11:34 +0300)
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>
linux-user/syscall.c

index 3e4895e8457f740cb7e884db784dc191e3700b4e..584aeccd8730928a0e0b608e6e6fd7aae4ed6d19 100644 (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();
             }