ipmi: start implementing flashDataFinish
Change-Id: I627f6b788311650637221413a93ce7f1a3f0d0cd
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/ipmi.cpp b/ipmi.cpp
index 5752682..d8e9f89 100644
--- a/ipmi.cpp
+++ b/ipmi.cpp
@@ -82,3 +82,19 @@
(*dataLen) = 1;
return IPMI_CC_OK;
}
+
+ipmi_ret_t dataFinish(UpdateInterface* updater, const uint8_t* reqBuf,
+ uint8_t* replyBuf, size_t* dataLen)
+{
+ if (!updater->flashFinish())
+ {
+ return IPMI_CC_INVALID;
+ }
+
+ /* TODO: If all commands return this on success, handle it in one place. */
+
+ /* We were successful and set the response byte to 0. */
+ replyBuf[0] = 0x00;
+ (*dataLen) = 1;
+ return IPMI_CC_OK;
+}