summaryrefslogtreecommitdiffstats
path: root/process.hpp
diff options
context:
space:
mode:
authorPatrick Venture <venture@google.com>2018-11-12 10:46:30 -0800
committerPatrick Venture <venture@google.com>2018-11-13 11:07:44 -0800
commit4125880028cc4a825f710b9e1b09986aacd4e1bb (patch)
treeb6d8defec27f0aefd5ac9b82356a9dd931a95ec4 /process.hpp
parent45e428a2b22f5ba134fa07ede6be1f99d12a6c2c (diff)
downloadphosphor-ipmi-blobs-4125880028cc4a825f710b9e1b09986aacd4e1bb.tar.gz
phosphor-ipmi-blobs-4125880028cc4a825f710b9e1b09986aacd4e1bb.zip
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>
Diffstat (limited to 'process.hpp')
-rw-r--r--process.hpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/process.hpp b/process.hpp
index 8f874dc..0e377bc 100644
--- a/process.hpp
+++ b/process.hpp
@@ -22,10 +22,12 @@ using IpmiBlobHandler =
* @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
OpenPOWER on IntegriCloud