buildjson: Support multiple configuration paths
This will allow us to parse configurations from multiple paths in the
filesystem when they are added.
Right now this does not enable new behavior, but a future change will
enable a non-persistent configuration location.
Change-Id: Ifa9bc5eff9cfca84c923be381ec9927c62c2a2e5
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/bmc/firmware-handler/main.cpp b/bmc/firmware-handler/main.cpp
index 32d83f0..a383d02 100644
--- a/bmc/firmware-handler/main.cpp
+++ b/bmc/firmware-handler/main.cpp
@@ -44,9 +44,6 @@
namespace
{
-static constexpr const char* jsonConfigurationPath =
- "/usr/share/phosphor-ipmi-flash/";
-
/**
* Given a name and path, create a HandlerPack.
*
@@ -115,8 +112,7 @@
ActionMap actionPacks = {};
FirmwareHandlersBuilder builder;
- std::vector<HandlerConfig<ActionPack>> configsFromJson =
- builder.buildHandlerConfigs(jsonConfigurationPath);
+ auto configsFromJson = builder.buildHandlerConfigsFromDefaultPaths();
std::vector<HandlerPack> supportedFirmware;