vbox: Register per partes

Since times when vbox moved to the daemon (due to some licensing
issue) the subdrivers that vbox implements were registered, but not
opened since our generic subdrivers took priority. I've tried to fix
this in 65b7d553f3 but it was not correct. Apparently moving
vbox driver registration upfront changes the default connection URI
which makes some users sad. So, this commit breaks vbox into pieces
and register vbox's network and storage drivers first, and vbox driver
then at the end. This way, the vbox driver is registered in the order
it always was, but its subdrivers are registered prior the generic
ones.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
Michal Privoznik
2014-08-27 08:05:25 +02:00
committed by Martin Kletzander
parent 27d59ab7cd
commit dbb4cbf532
5 changed files with 112 additions and 13 deletions
+14 -2
View File
@@ -383,7 +383,7 @@ static void daemonInitialize(void)
* is not loaded they'll get a suitable error at that point
*/
# ifdef WITH_VBOX
virDriverLoadModule("vbox");
virDriverLoadModule("vbox_network");
# endif
# ifdef WITH_NETWORK
virDriverLoadModule("network");
@@ -391,6 +391,9 @@ static void daemonInitialize(void)
# ifdef WITH_INTERFACE
virDriverLoadModule("interface");
# endif
# ifdef WITH_VBOX
virDriverLoadModule("vbox_storage");
# endif
# ifdef WITH_STORAGE
virDriverLoadModule("storage");
# endif
@@ -418,12 +421,15 @@ static void daemonInitialize(void)
# ifdef WITH_UML
virDriverLoadModule("uml");
# endif
# ifdef WITH_VBOX
virDriverLoadModule("vbox");
# endif
# ifdef WITH_BHYVE
virDriverLoadModule("bhyve");
# endif
#else
# ifdef WITH_VBOX
vboxRegister();
vboxNetworkRegister();
# endif
# ifdef WITH_NETWORK
networkRegister();
@@ -431,6 +437,9 @@ static void daemonInitialize(void)
# ifdef WITH_INTERFACE
interfaceRegister();
# endif
# ifdef WITH_VBOX
vboxStorageRegister();
# endif
# ifdef WITH_STORAGE
storageRegister();
# endif
@@ -458,6 +467,9 @@ static void daemonInitialize(void)
# ifdef WITH_UML
umlRegister();
# endif
# ifdef WITH_VBOX
vboxRegister();
# endif
# ifdef WITH_BHYVE
bhyveRegister();
# endif