]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
Add uevent netlink service.
authorTang Chen <tangchen@cn.fujitsu.com>
Wed, 22 Aug 2012 04:10:25 +0000 (12:10 +0800)
committerDaniel Veillard <veillard@redhat.com>
Wed, 22 Aug 2012 10:26:15 +0000 (18:26 +0800)
This patch adds a new netlink service with NETLINK_KOBJECT_UEVENT
protocol hotplug event.

Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>
daemon/libvirtd.c

index c7f8d3b740d4ae8cf104a0f4132a68a70a504d41..19dd26bffc0153ccdfcd5d83e7dab36dca8cc337 100644 (file)
@@ -1318,6 +1318,12 @@ int main(int argc, char **argv) {
         goto cleanup;
     }
 
+    /* Register the netlink event service for NETLINK_KOBJECT_UEVENT */
+    if (virNetlinkEventServiceStart(NETLINK_KOBJECT_UEVENT, 1) < 0) {
+        ret = VIR_DAEMON_ERR_NETWORK;
+        goto cleanup;
+    }
+
     /* Run event loop. */
     virNetServerRun(srv);