summaryrefslogtreecommitdiffstats
path: root/tools/updater.hpp
diff options
context:
space:
mode:
authorPatrick Venture <venture@google.com>2019-05-15 15:58:06 -0700
committerPatrick Venture <venture@google.com>2019-05-15 16:07:52 -0700
commitd61b0ff8d1dbc2ea4688b74a9836a000339902cf (patch)
treea0dc0c4b5eda4883cc54242759f3088f05724c34 /tools/updater.hpp
parent9420ad20777cb28acd5c66c3c4dd75a17b8364e2 (diff)
downloadphosphor-ipmi-flash-d61b0ff8d1dbc2ea4688b74a9836a000339902cf.tar.gz
phosphor-ipmi-flash-d61b0ff8d1dbc2ea4688b74a9836a000339902cf.zip
tools: implement firmware verification polling
The verification process is asynchronous, therefore poll the BMC firmware state. Tested: Verified it behaves as intended, before moving it into a sub-routine: Opening the verification file Committing to verification file to trigger verification service Calling stat on verification session to check status stat received: blob_state: 0x206 size: 0x0 metadata(1): 0x3 other stat received: blob_state: 0x206 size: 0x0 metadata(1): 0x0 running stat received: blob_state: 0x206 size: 0x0 metadata(1): 0x0 running stat received: blob_state: 0x206 size: 0x0 metadata(1): 0x1 success stat received: blob_state: 0x206 size: 0x0 metadata(1): 0x1 success Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I3cb13d1a966c2c833fd4fee5654332f34e80355a
Diffstat (limited to 'tools/updater.hpp')
-rw-r--r--tools/updater.hpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/updater.hpp b/tools/updater.hpp
index 0a66f34..062f704 100644
--- a/tools/updater.hpp
+++ b/tools/updater.hpp
@@ -9,6 +9,16 @@ namespace host_tool
{
/**
+ * Poll an open verification session.
+ *
+ * @param[in] session - the open verification session
+ * @param[in] blob - pointer to blob interface implementation object.
+ * @return true if the verification was successul.
+ */
+bool pollVerificationStatus(std::uint16_t session,
+ ipmiblob::BlobInterface* blob);
+
+/**
* Attempt to update the BMC's firmware using the interface provided.
*
* @param[in] blob - pointer to blob interface implementation object.
OpenPOWER on IntegriCloud