new command: BmcBlobWriteMeta
Implement new command BmcBlobWriteMeta.
Change-Id: I2e148f4bde4ef5d24db7e30bb02bdde024d9166a
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/manager.cpp b/manager.cpp
index 6a94c1a..32fdd74 100644
--- a/manager.cpp
+++ b/manager.cpp
@@ -316,6 +316,21 @@
return handler->deleteBlob(path);
}
+bool BlobManager::writeMeta(uint16_t session, uint32_t offset,
+ const std::vector<uint8_t>& data)
+{
+ SessionInfo* info = getSessionInfo(session);
+
+ /* No session found. */
+ if (!info)
+ {
+ return false;
+ }
+
+ /* Try writing metadata to it. */
+ return info->handler->writeMeta(session, offset, data);
+}
+
bool BlobManager::getSession(uint16_t* sess)
{
uint16_t tries = 0;