diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2014-01-29 13:28:06 +0800 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2014-01-30 21:59:10 +0800 |
commit | c14b12980885edd035322cd3bc87efff444c39b1 (patch) | |
tree | 138bac8bfacd9d1a36d04421d91e0eedf4164da2 /lib/pb-config/storage.h | |
parent | dea7842fb28ff055b4e0f43a6a1fdaf3c4b5ba89 (diff) | |
download | talos-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 'lib/pb-config/storage.h')
-rw-r--r-- | lib/pb-config/storage.h | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/lib/pb-config/storage.h b/lib/pb-config/storage.h deleted file mode 100644 index 5b4af56..0000000 --- a/lib/pb-config/storage.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef STORAGE_H -#define STORAGE_H - -#include <stdbool.h> - -struct config; - -struct config_storage { - int (*load)(struct config_storage *st, struct config *config); - int (*save)(struct config_storage *st, struct config *config); -}; - -struct config_storage *create_powerpc_nvram_storage(void *ctx); -struct config_storage *create_test_storage(void *ctx); -struct config_storage *create_null_storage(void *ctx); - -#endif /* STORAGE_H */ - |