Patrick Venture | c7ca291 | 2018-11-02 11:38:33 -0700 | [diff] [blame] | 1 | #include "firmware_handler.hpp" |
| 2 | |
| 3 | #include <blobs-ipmid/manager.hpp> |
| 4 | #include <memory> |
| 5 | #include <phosphor-logging/log.hpp> |
| 6 | |
| 7 | namespace blobs |
| 8 | { |
| 9 | using namespace phosphor::logging; |
| 10 | |
| 11 | void setupFirmwareHandler() __attribute__((constructor)); |
| 12 | |
| 13 | void setupFirmwareHandler() |
| 14 | { |
| 15 | auto* manager = getBlobManager(); |
Patrick Venture | 68cf64f | 2018-11-06 10:46:51 -0800 | [diff] [blame^] | 16 | if (!manager->registerHandler( |
| 17 | FirmwareBlobHandler::CreateFirmwareBlobHandler())) |
Patrick Venture | c7ca291 | 2018-11-02 11:38:33 -0700 | [diff] [blame] | 18 | { |
| 19 | log<level::ERR>("Failed to register Firmware Handler"); |
| 20 | } |
| 21 | } |
| 22 | |
| 23 | } // namespace blobs |