bmc: add /flash/update to firmare handler
The /flash/update blob id will only appear when it's an available option
(after a successful image verification). Add a Session for tracking
access to /flash/update.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I9e76c5217d4a71346c959061fb51418e3aa39c81
diff --git a/firmware_handler.hpp b/firmware_handler.hpp
index 73a0668..2b2c7d3 100644
--- a/firmware_handler.hpp
+++ b/firmware_handler.hpp
@@ -133,7 +133,8 @@
handlers(firmwares),
blobIDs(blobs), transports(transports), bitmask(bitmask),
activeImage(activeImageBlobId), activeHash(activeHashBlobId),
- verifyImage(verifyBlobId), lookup(), state(UpdateState::notYetStarted),
+ verifyImage(verifyBlobId), updateImage(updateBlobId), lookup(),
+ state(UpdateState::notYetStarted),
verification(std::move(verification)), update(std::move(update))
{
}
@@ -190,6 +191,9 @@
/** Session for verification. */
Session verifyImage;
+ /** Session for update. */
+ Session updateImage;
+
/** A quick method for looking up a session's mechanisms and details. */
std::map<std::uint16_t, Session*> lookup;