tools: implement blob read
Implement blob read. This isn't currently used by the flash update
process however, it is useful.
Tested: Verified it read back bytes written to another blob handler.
Change-Id: Ib1590448d0bfaa3d4fde20ae8bae353c9107e5c4
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/tools/blob_handler.hpp b/tools/blob_handler.hpp
index e7da30f..1cbc963 100644
--- a/tools/blob_handler.hpp
+++ b/tools/blob_handler.hpp
@@ -69,6 +69,13 @@
void closeBlob(std::uint16_t session) override;
+ /**
+ * @throws BlobException.
+ */
+ std::vector<std::uint8_t> readBytes(std::uint16_t session,
+ std::uint32_t offset,
+ std::uint32_t length) override;
+
private:
/**
* Send the contents of the payload to IPMI, this method handles wrapping