bmc: allow configuring the verification output path
Allow configuring the file checked to determine the status of the
asynchronous image verification process.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Ia37ed81cd08fa4ce0313092134c476cc42eb8119
diff --git a/firmware_handler.hpp b/firmware_handler.hpp
index 3e36897..3467ccd 100644
--- a/firmware_handler.hpp
+++ b/firmware_handler.hpp
@@ -126,10 +126,12 @@
* @param[in] bus - an sdbusplus handler for a bus to use.
* @param[in] firmwares - list of firmware blob_ids to support.
* @param[in] transports - list of transports to support.
+ * @param[in[ verificationPath - path to check for verification output
*/
static std::unique_ptr<GenericBlobInterface> CreateFirmwareBlobHandler(
sdbusplus::bus::bus&& bus, const std::vector<HandlerPack>& firmwares,
- const std::vector<DataHandlerPack>& transports);
+ const std::vector<DataHandlerPack>& transports,
+ const std::string& verificationPath);
/**
* Create a FirmwareBlobHandler.
@@ -144,12 +146,13 @@
const std::vector<HandlerPack>& firmwares,
const std::vector<std::string>& blobs,
const std::vector<DataHandlerPack>& transports,
- std::uint16_t bitmask) :
+ std::uint16_t bitmask,
+ const std::string& verificationPath) :
bus(std::move(bus)),
handlers(firmwares), blobIDs(blobs), transports(transports),
bitmask(bitmask), activeImage(activeImageBlobId),
activeHash(activeHashBlobId), verifyImage(verifyBlobId), lookup(),
- state(UpdateState::notYetStarted)
+ state(UpdateState::notYetStarted), verificationPath(verificationPath)
{
}
~FirmwareBlobHandler() = default;
@@ -213,6 +216,8 @@
/** The firmware update state. */
UpdateState state;
+ const std::string verificationPath;
+
/** Temporary variable to track whether a blob is open. */
bool fileOpen = false;
};