process: add IPMI error return mechanism and update errors

The IPMI packet validation code must return specific IPMI errors
corresponding to what error has occurred instead of the invalid command
error.

Update all IPMI handler pieces to return more specific errors.

Change-Id: I8d21e92015d84cc0880e3b83991aed7288e19eab
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/process.hpp b/process.hpp
index 8f874dc..0e377bc 100644
--- a/process.hpp
+++ b/process.hpp
@@ -22,10 +22,12 @@
  * @param[in,out] replyCmdBuf - a pointer to the ipmi reply packet buffer.
  * @param[in,out] dataLen - initially the request length, set to reply length
  *                          on return.
- * @return the ipmi command handler.
+ * @param[out] code - set to the IPMI error on failure, otherwise unset.
+ * @return the ipmi command handler, or nullptr on failure.
  */
 IpmiBlobHandler validateBlobCommand(CrcInterface* crc, const uint8_t* reqBuf,
-                                    uint8_t* replyCmdBuf, size_t* dataLen);
+                                    uint8_t* replyCmdBuf, size_t* dataLen,
+                                    ipmi_ret_t* code);
 
 /**
  * Call the IPMI command and process the result, including running the CRC