tools: return data or throw exception on ipmi resp

When the IPMI_CC is non-zero, throw an exception and include the code,
otherwise if the response buffer is non-null, return the bytes received.

Change-Id: Id81281d7fd79f3075fcdd4bbf86ffdd83d8a3721
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/tools/ipmi_handler.cpp b/tools/ipmi_handler.cpp
index 7a6e407..76bd3e0 100644
--- a/tools/ipmi_handler.cpp
+++ b/tools/ipmi_handler.cpp
@@ -16,7 +16,8 @@
 
 #include "ipmi_handler.hpp"
 
-int IpmiHandler::sendPacket(const std::vector<std::uint8_t>& data)
+std::vector<std::uint8_t>
+    IpmiHandler::sendPacket(const std::vector<std::uint8_t>& data)
 {
-    return 0;
+    return {};
 }