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/test/ipmi_interface_mock.hpp b/test/ipmi_interface_mock.hpp
index bee3da4..2fac71d 100644
--- a/test/ipmi_interface_mock.hpp
+++ b/test/ipmi_interface_mock.hpp
@@ -8,5 +8,6 @@
{
public:
virtual ~IpmiInterfaceMock() = default;
- MOCK_METHOD1(sendPacket, int(const std::vector<std::uint8_t>&));
+ MOCK_METHOD1(sendPacket,
+ std::vector<std::uint8_t>(const std::vector<std::uint8_t>&));
};