]> git.ozlabs.org Git - petitboot/commit - test/parser/Makefile.am
pb-config: Move config storage modules to "platform" modules in discover code
authorJeremy Kerr <jk@ozlabs.org>
Wed, 29 Jan 2014 05:28:06 +0000 (13:28 +0800)
committerJeremy Kerr <jk@ozlabs.org>
Thu, 30 Jan 2014 13:59:10 +0000 (21:59 +0800)
commitc14b12980885edd035322cd3bc87efff444c39b1
tree138bac8bfacd9d1a36d04421d91e0eedf4164da2
parentdea7842fb28ff055b4e0f43a6a1fdaf3c4b5ba89
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>
18 files changed:
discover/Makefile.am
discover/device-handler.c
discover/discover-server.c
discover/network.c
discover/pb-discover.c
discover/platform-powerpc.c [new file with mode: 0644]
discover/platform.c [new file with mode: 0644]
discover/platform.h [new file with mode: 0644]
lib/Makefile.am
lib/pb-config/pb-config.c
lib/pb-config/pb-config.h
lib/pb-config/storage-null.c [deleted file]
lib/pb-config/storage-powerpc-nvram.c [deleted file]
lib/pb-config/storage-test.c [deleted file]
lib/pb-config/storage.h [deleted file]
test/parser/Makefile.am
test/parser/parser-test.h
test/parser/utils.c