[PATCH 3/4] Add uevent netlink service.

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

 



This patch adds a new netlink service with NETLINK_KOBJECT_UEVENT
protocol hotplug event.

Signed-off-by: Tang Chen <tangchen@xxxxxxxxxxxxxx>
---
 daemon/libvirtd.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c
index 922c5b5..c0a2f03 100644
--- a/daemon/libvirtd.c
+++ b/daemon/libvirtd.c
@@ -1316,6 +1316,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);
 
-- 
1.7.10.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]