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.hpp b/tools/ipmi_handler.hpp
index ea42507..9e86f42 100644
--- a/tools/ipmi_handler.hpp
+++ b/tools/ipmi_handler.hpp
@@ -7,5 +7,6 @@
public:
IpmiHandler() = default;
- int sendPacket(const std::vector<std::uint8_t>& data) override;
+ std::vector<std::uint8_t>
+ sendPacket(const std::vector<std::uint8_t>& data) override;
};