[RFC PATCH 4/7] libvirtd: Add config driver hooks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch adds the config driver hooks and moves the secret driver hook definitions higher on the list. The secret driver move isn't strictly needed, but the comments state that these should be in preferred load order. Since other drivers might utilize the secret driver, it makes sense to have it loaded earlier in the startup sequence.

Signed-off-by: Adam Walters <adam@xxxxxxxxxxxxxxxxx>
---
 daemon/libvirtd.c | 21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)

diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c
index 49c42ad..251c2f4 100644
--- a/daemon/libvirtd.c
+++ b/daemon/libvirtd.c
@@ -95,6 +95,9 @@
 # ifdef WITH_NWFILTER
 #  include "nwfilter/nwfilter_driver.h"
 # endif
+# ifdef WITH_CONFIG
+#  include "config/config_driver.h"
+# endif
 #endif
 
 #include "configmake.h"
@@ -369,18 +372,21 @@ static void daemonInitialize(void)
      * If they try to open a connection for a module that
      * is not loaded they'll get a suitable error at that point
      */
+# ifdef WITH_CONFIG
+    virDriverLoadModule("config");
+# endif
 # 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
@@ -406,21 +412,24 @@ static void daemonInitialize(void)
     virDriverLoadModule("vbox");
 # endif
 #else
+# ifdef WITH_CONFIG
+    configRegister();
+# endif
 # ifdef WITH_NETWORK
     networkRegister();
 # endif
 # 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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]