bmc: move support transports vector into factory
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I6b74c533bffe65e6effa06950338ebcd157f8b79
diff --git a/bmc/main.cpp b/bmc/main.cpp
index a3d26ac..97e18e1 100644
--- a/bmc/main.cpp
+++ b/bmc/main.cpp
@@ -76,19 +76,6 @@
NetDataHandler netDataHandler;
#endif
-std::vector<DataHandlerPack> supportedTransports = {
- {FirmwareFlags::UpdateFlags::ipmi, nullptr},
-#ifdef ENABLE_PCI_BRIDGE
- {FirmwareFlags::UpdateFlags::p2a, &pciDataHandler},
-#endif
-#ifdef ENABLE_LPC_BRIDGE
- {FirmwareFlags::UpdateFlags::lpc, &lpcDataHandler},
-#endif
-#ifdef ENABLE_NET_BRIDGE
- {FirmwareFlags::UpdateFlags::net, &netDataHandler},
-#endif
-};
-
/**
* Given a name and path, create a HandlerPack.
*
@@ -114,6 +101,19 @@
{
using namespace ipmi_flash;
+ std::vector<DataHandlerPack> supportedTransports = {
+ {FirmwareFlags::UpdateFlags::ipmi, nullptr},
+#ifdef ENABLE_PCI_BRIDGE
+ {FirmwareFlags::UpdateFlags::p2a, &pciDataHandler},
+#endif
+#ifdef ENABLE_LPC_BRIDGE
+ {FirmwareFlags::UpdateFlags::lpc, &lpcDataHandler},
+#endif
+#ifdef ENABLE_NET_BRIDGE
+ {FirmwareFlags::UpdateFlags::net, &netDataHandler},
+#endif
+ };
+
ActionMap actionPacks = {};
std::vector<HandlerConfig> configsFromJson =