]> xenbits.xensource.com Git - libvirt.git/commit
daemon: Fix driver registration ordering
authorMichal Privoznik <mprivozn@redhat.com>
Fri, 15 Aug 2014 10:26:09 +0000 (12:26 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 18 Aug 2014 09:49:10 +0000 (11:49 +0200)
commit65b7d553f39ff958d580df871e90aefd30ea3466
treec216054c1fe4954ecfbc68d9e8b84329506c8ff3
parent992318cbee83dc381c44acfdfdecfb2607279e25
daemon: Fix driver registration ordering

There are some stateless drivers which implement subdrivers
(typically vbox and its own network and storage subdrivers). However,
as of ba5f3c7c8ecc10 the vbox driver lives in the daemon, not the
client library. This means, in order for vbox (or any stateless domain
driver) to use its subdrivers, it must register before the general
drivers. Later, when the virConnectOpen function goes through the
subdrivers, stateless drivers are searched first. If the connection
request is aiming at stateless driver, it will be opened. Otherwise
the generic subdriver is opened.

The other change done in this commit is moving interface module load a
bit earlier to match the ordering in case libvirt is built without
driver modules.

Reported-by: Taowei Luo <uaedante@gmail.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
daemon/libvirtd.c