Add LUN to the IPMI sensor context structure
Systems monitored by BMCs may have more than 255 sensors. This code
change provides the necessary piece to allow a BMC to support more
than 255 sensors. It does this by adding a variable to store a LUN
value. This allows LUN 0 to manage 255 sensors, and any overflow may
be assigned to LUN 1.
Tested:
Confirmed the following commands still work:
"ipmitool sdr elist"
"ipmitool sensor list"
"ipmitool raw 4 0x20 0"
"ipmitool raw -l 1 4 0x20 0"
Change-Id: I92d5205eac33829d8133f2e38ed96bfc5a9bc033
Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
diff --git a/include/ipmid/message.hpp b/include/ipmid/message.hpp
index c828e3c..0da1779 100644
--- a/include/ipmid/message.hpp
+++ b/include/ipmid/message.hpp
@@ -42,10 +42,10 @@
Context& operator=(Context&&) = delete;
Context(std::shared_ptr<sdbusplus::asio::connection> bus, NetFn netFn,
- Cmd cmd, int channel, int userId, uint32_t sessionId,
+ uint8_t lun, Cmd cmd, int channel, int userId, uint32_t sessionId,
Privilege priv, int rqSA, boost::asio::yield_context& yield) :
bus(bus),
- netFn(netFn), cmd(cmd), channel(channel), userId(userId),
+ netFn(netFn), lun(lun), cmd(cmd), channel(channel), userId(userId),
sessionId(sessionId), priv(priv), rqSA(rqSA), yield(yield)
{
}
@@ -53,6 +53,7 @@
std::shared_ptr<sdbusplus::asio::connection> bus;
// normal IPMI context (what call is this, from whence it came...)
NetFn netFn;
+ uint8_t lun;
Cmd cmd;
int channel;
int userId;