aboutsummaryrefslogtreecommitdiff
path: root/daemon
diff options
context:
space:
mode:
authorTang Chen <tangchen@cn.fujitsu.com>2012-08-22 12:10:25 +0800
committerDaniel Veillard <veillard@redhat.com>2012-08-22 18:26:15 +0800
commit080bf330e3749d94ebe094f8deca0e3e67d3f2fe (patch)
tree6c1b1971c23069b5087c4d1a59bf439b7e05d327 /daemon
parentIntroduce virNetlinkEventServiceStopAll() to stop all netlink services. (diff)
downloadlibvirt-080bf330e3749d94ebe094f8deca0e3e67d3f2fe.tar.gz
libvirt-080bf330e3749d94ebe094f8deca0e3e67d3f2fe.tar.bz2
libvirt-080bf330e3749d94ebe094f8deca0e3e67d3f2fe.zip
Add uevent netlink service.
This patch adds a new netlink service with NETLINK_KOBJECT_UEVENT protocol hotplug event. Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>
Diffstat (limited to 'daemon')
-rw-r--r--daemon/libvirtd.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c
index c7f8d3b74..19dd26bff 100644
--- a/daemon/libvirtd.c
+++ b/daemon/libvirtd.c
@@ -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);