summaryrefslogtreecommitdiffstats
path: root/discover/pb-discover.c
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2014-01-29 13:28:06 +0800
committerJeremy Kerr <jk@ozlabs.org>2014-01-30 21:59:10 +0800
commitc14b12980885edd035322cd3bc87efff444c39b1 (patch)
tree138bac8bfacd9d1a36d04421d91e0eedf4164da2 /discover/pb-discover.c
parentdea7842fb28ff055b4e0f43a6a1fdaf3c4b5ba89 (diff)
downloadtalos-petitboot-c14b12980885edd035322cd3bc87efff444c39b1.tar.gz
talos-petitboot-c14b12980885edd035322cd3bc87efff444c39b1.zip
pb-config: Move config storage modules to "platform" modules in discover code
There's no need to include the config storage code in lib/ as only the discover server should be using it. This change moves the config-storage code to discover/, with the platform-specific parts moved to a 'struct platform'. Each platform has a probe function, which is called during init. The first probe function to return a platform is used. At present we only have the one platform, but it's now non-intrusive to add others. We keep an array of platform pointers in a separate ("platforms") section, to allow the test module to drop-in its own test "platform". Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'discover/pb-discover.c')
-rw-r--r--discover/pb-discover.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/discover/pb-discover.c b/discover/pb-discover.c
index d8708a3..bb590a9 100644
--- a/discover/pb-discover.c
+++ b/discover/pb-discover.c
@@ -11,7 +11,6 @@
#include <waiter/waiter.h>
#include <log/log.h>
-#include <pb-config/pb-config.h>
#include <process/process.h>
#include <talloc/talloc.h>
@@ -21,6 +20,7 @@
#include "device-handler.h"
#include "network.h"
#include "sysinfo.h"
+#include "platform.h"
static void print_version(void)
{
@@ -170,7 +170,7 @@ int main(int argc, char *argv[])
if (!procset)
return EXIT_FAILURE;
- config_init(NULL);
+ platform_init(NULL);
if (opts.no_autoboot == opt_yes)
config_set_autoboot(false);
@@ -205,7 +205,7 @@ int main(int argc, char *argv[])
user_event_destroy(uev);
udev_destroy(udev);
discover_server_destroy(server);
- config_fini();
+ platform_fini();
talloc_free(waitset);
pb_log("--- end ---\n");
OpenPOWER on IntegriCloud