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/test/ipmi_open_unittest.cpp b/test/ipmi_open_unittest.cpp
index 523025d..704c144 100644
--- a/test/ipmi_open_unittest.cpp
+++ b/test/ipmi_open_unittest.cpp
@@ -39,7 +39,8 @@
 
     dataLen = sizeof(struct BmcBlobOpenTx) + blobId.length();
 
-    EXPECT_EQ(IPMI_CC_INVALID, openBlob(&mgr, request, reply, &dataLen));
+    EXPECT_EQ(IPMI_CC_REQ_DATA_LEN_INVALID,
+              openBlob(&mgr, request, reply, &dataLen));
 }
 
 TEST(BlobOpenTest, RequestRejectedReturnsFailure)
@@ -65,7 +66,8 @@
     EXPECT_CALL(mgr, open(req->flags, StrEq(blobId), _))
         .WillOnce(Return(false));
 
-    EXPECT_EQ(IPMI_CC_INVALID, openBlob(&mgr, request, reply, &dataLen));
+    EXPECT_EQ(IPMI_CC_UNSPECIFIED_ERROR,
+              openBlob(&mgr, request, reply, &dataLen));
 }
 
 TEST(BlobOpenTest, BlobOpenReturnsOk)