From: Tang Chen Date: Wed, 22 Aug 2012 04:10:25 +0000 (+0800) Subject: Add uevent netlink service. X-Git-Tag: v0.10.0-rc1~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=080bf330e3749d94ebe094f8deca0e3e67d3f2fe;p=thirdparty%2Flibvirt.git Add uevent netlink service. This patch adds a new netlink service with NETLINK_KOBJECT_UEVENT protocol hotplug event. Signed-off-by: Tang Chen --- diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c index c7f8d3b740..19dd26bffc 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);