ipmi_flash.md: update docs to include fileOpen state

Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Ia45e55dc5192be9c1564d5fbd78b16b1c53156a6
diff --git a/ipmi_flash.md b/ipmi_flash.md
index ade81b2..f69d226 100644
--- a/ipmi_flash.md
+++ b/ipmi_flash.md
@@ -17,6 +17,24 @@
 
 The two files are only present once their corresponding blob has been opened.
 
+# The state of fileOpen per state
+
+You can only open one file at a time, and some of the states exist only when a
+file is open.
+
+State                   | fileOpen
+:---------------------- | :-------
+`notYetStarted`         | `false`
+`uploadInProgress`      | `true`
+`verificationPending`   | `false`
+`verificationStarted`   | `true`
+`verificationCompleted` | `true`
+`updatePending`         | `false`
+`updateStarted`         | `true`
+`updatedCompleted`      | `true`
+
+# The states in the Firmware Handler State Machine
+
 ## `notYetStarted`
 
 **The starting state.**
@@ -85,23 +103,29 @@
 
 # Expected State Transition Sequence
 
-Action                   | Before | After
-:----------------------- | :----: | :----------------:
-1. getBlobList()         | NYS    | NYS
-2. stat(/flash/image)    | NYS    | NYS
-3. open(/flash/image)    | NYS    | UIP
-4. write(...)            | UIP    | UIP
-5. close(/flash/image)   | UIP    | VP
-6. open(/flash/hash)     | VP     | UIP
-7. write(...)            | UIP    | UIP
-8. close(/flash/hash)    | UIP    | VP
-9. open(/flash/verify)   | VP     | VP
-10. commit(...)          | VP     | VS
-11. sessionStat(...)     | VS     | VS (if !completed)
-11. sessionStat(...)     | VS     | VC (if completed)
-12. close(/flash/verify) | VC     | UP
-13. open(/flash/update)  | UP     | UP
-14. commit(...)          | UP     | US
-15. sessionStat(...)     | US     | US (if !completed)
-15. sessionStat(...)     | US     | UC (if completed)
-16. close(/flash/update) | UC     | NYS
+If verification fails, the state still transitions to `verificationCompleted`
+and similarly, if the update fails the state still transitions to
+`updateCompleted`. It is up to the host-tool to check the result of the process
+by running the `stat()` command on their open session (either their session with
+the `verifyBlobId` or the `updateBlobId`.
+
+Action                     | Before | After
+:------------------------- | :----: | :----------------:
+1. `getBlobList()`         | NYS    | NYS
+2. `stat(/flash/image)`    | NYS    | NYS
+3. `open(/flash/image)`    | NYS    | UIP
+4. `write(...)`            | UIP    | UIP
+5. `close(/flash/image)`   | UIP    | VP
+6. `open(/flash/hash)`     | VP     | UIP
+7. `write(...)`            | UIP    | UIP
+8. `close(/flash/hash)`    | UIP    | VP
+9. `open(/flash/verify)`   | VP     | VP
+10. `commit(...)`          | VP     | VS
+11. `sessionStat(...)`     | VS     | VS (if !completed)
+11. `sessionStat(...)`     | VS     | VC (if completed)
+12. `close(/flash/verify)` | VC     | UP
+13. `open(/flash/update)`  | UP     | UP
+14. `commit(...)`          | UP     | US
+15. `sessionStat(...)`     | US     | US (if !completed)
+15. `sessionStat(...)`     | US     | UC (if completed)
+16. `close(/flash/update)` | UC     | NYS