ipmi: start implementing flashDataVerify
Change-Id: I446ca8573db31eb53dc7aefbe25cdb9d23d51d29
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/ipmi.cpp b/ipmi.cpp
index fad2049..fc6092c 100644
--- a/ipmi.cpp
+++ b/ipmi.cpp
@@ -30,6 +30,7 @@
{FlashSubCmds::flashStartHash, startHash},
{FlashSubCmds::flashHashData, hashBlock},
{FlashSubCmds::flashHashFinish, hashFinish},
+ {FlashSubCmds::flashDataVerify, dataVerify},
};
auto results = subHandlers.find(command);
@@ -177,3 +178,17 @@
(*dataLen) = 1;
return IPMI_CC_OK;
}
+
+ipmi_ret_t dataVerify(UpdateInterface* updater, const uint8_t* reqBuf,
+ uint8_t* replyBuf, size_t* dataLen)
+{
+ if (!updater->startDataVerification())
+ {
+ return IPMI_CC_INVALID;
+ }
+
+ /* We were successful and set the response byte to 0. */
+ replyBuf[0] = 0x00;
+ (*dataLen) = 1;
+ return IPMI_CC_OK;
+}