diff options
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
@@ -18,6 +18,7 @@ #include "ipmi.hpp" #include "process.hpp" +#include "utils.hpp" #include <host-ipmid/ipmid-api.h> @@ -26,10 +27,6 @@ #include <host-ipmid/oemrouter.hpp> #include <memory> -#if ENABLE_EXAMPLE -#include "example/example.hpp" -#endif - /* TODO: Swap out once https://gerrit.openbmc-project.xyz/12743 is merged */ namespace oem { @@ -63,6 +60,9 @@ static ipmi_ret_t handleBlobCommand(ipmi_cmd_t cmd, const uint8_t* reqBuf, dataLen); } +/* TODO: this should come from the makefile or recipe... */ +constexpr auto expectedHandlerPath = "/usr/lib/blobs-ipmid"; + void setupBlobGlobalHandler() __attribute__((constructor)); void setupBlobGlobalHandler() @@ -75,9 +75,7 @@ void setupBlobGlobalHandler() oemRouter->registerHandler(oem::obmcOemNumber, oem::blobTransferCmd, handleBlobCommand); -#if ENABLE_EXAMPLE - BlobManager* manager = getBlobManager(); - manager->registerHandler(std::move(std::make_unique<ExampleBlobHandler>())); -#endif + /* Install handlers. */ + loadLibraries(expectedHandlerPath); } } // namespace blobs |