diff options
author | Patrick Venture <venture@google.com> | 2018-10-04 10:32:22 -0700 |
---|---|---|
committer | Patrick Venture <venture@google.com> | 2018-10-10 15:41:50 +0000 |
commit | 5c4b17b2c5ae15bfcb92447151863c4ad67f40fa (patch) | |
tree | d2baa54371ece5d4d80c0d4f82b03691f28d20d2 /manager.cpp | |
parent | e225540cc7dc627c85a976fdc7ff0221b64ed937 (diff) | |
download | phosphor-ipmi-blobs-5c4b17b2c5ae15bfcb92447151863c4ad67f40fa.tar.gz phosphor-ipmi-blobs-5c4b17b2c5ae15bfcb92447151863c4ad67f40fa.zip |
new command: BmcBlobWriteMeta
Implement new command BmcBlobWriteMeta.
Change-Id: I2e148f4bde4ef5d24db7e30bb02bdde024d9166a
Signed-off-by: Patrick Venture <venture@google.com>
Diffstat (limited to 'manager.cpp')
-rw-r--r-- | manager.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/manager.cpp b/manager.cpp index 6a94c1a..32fdd74 100644 --- a/manager.cpp +++ b/manager.cpp @@ -316,6 +316,21 @@ bool BlobManager::deleteBlob(const std::string& path) 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; |