[libvirt] [RFC PATCHv2 3/4] libvirtd: Reorder load of secrets driver

Adam Walters adam at pandorasboxen.com
Thu Jan 23 20:14:22 UTC 2014


This patch changes the order in which the drivers are loaded in
libvirtd.c. Per the comment at the top of the daemonInitialize function,
order is important. Since the storage driver may depend on the secrets
driver, but the secrets driver can't depend on the storage driver, I
moved the loading of the secrets driver to just above the storage
driver.

Signed-off-by: Adam Walters <adam at pandorasboxen.com>
---
 daemon/libvirtd.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c
index 1e76f5a..251c2f4 100644
--- a/daemon/libvirtd.c
+++ b/daemon/libvirtd.c
@@ -378,15 +378,15 @@ static void daemonInitialize(void)
 # ifdef WITH_NETWORK
     virDriverLoadModule("network");
 # endif
+# ifdef WITH_SECRETS
+    virDriverLoadModule("secret");
+# endif
 # ifdef WITH_STORAGE
     virDriverLoadModule("storage");
 # endif
 # ifdef WITH_NODE_DEVICES
     virDriverLoadModule("nodedev");
 # endif
-# ifdef WITH_SECRETS
-    virDriverLoadModule("secret");
-# endif
 # ifdef WITH_NWFILTER
     virDriverLoadModule("nwfilter");
 # endif
@@ -421,15 +421,15 @@ static void daemonInitialize(void)
 # ifdef WITH_INTERFACE
     interfaceRegister();
 # endif
+# ifdef WITH_SECRETS
+    secretRegister();
+# endif
 # ifdef WITH_STORAGE
     storageRegister();
 # endif
 # ifdef WITH_NODE_DEVICES
     nodedevRegister();
 # endif
-# ifdef WITH_SECRETS
-    secretRegister();
-# endif
 # ifdef WITH_NWFILTER
     nwfilterRegister();
 # endif
-- 
1.8.5.2




More information about the libvir-list mailing list