firmware: tie implementation of session into write
To demonstrate how session will work, implement the write command.
Everything isn't wired up with open(), therefore this code itself will
only work in isolation.
This requires wiring up the open command to verify write will use the
handler we specify.
Change-Id: Icf5cfad4ddb531bc271642e24d505cbb9abf8f22
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/main.cpp b/main.cpp
index 4a5b8a6..44b5836 100644
--- a/main.cpp
+++ b/main.cpp
@@ -1,6 +1,7 @@
#include "config.h"
#include "firmware_handler.hpp"
+#include "hash_handler.hpp"
#include "image_handler.hpp"
#include "lpc_handler.hpp"
#include "pci_handler.hpp"
@@ -17,11 +18,13 @@
namespace
{
+HashFileHandler hashHandler;
StaticLayoutHandler staticLayoutHandler;
LpcDataHandler lpcDataHandler;
PciDataHandler pciDataHandler;
std::vector<HandlerPack> supportedFirmware = {
+ {FirmwareBlobHandler::hashBlobID, &hashHandler},
#ifdef ENABLE_STATIC_LAYOUT
{"/flash/image", &staticLayoutHandler},
#endif