Move SensorSubTree declaration to ipmi scope
Move SensorSubTree declaration to ipmi scope
Issue: Unable to resolve this symbol during loading of this
library, which is due to definition & declaration being in different
scope.
Unit-Test:
Verified that library is loaded properly and ipmitool sensor list
works.
Change-Id: I243e0033d0b76a14c0976f16bd6b893c0e96cb55
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
diff --git a/include/sensorcommands.hpp b/include/sensorcommands.hpp
index 6135105..66536c2 100644
--- a/include/sensorcommands.hpp
+++ b/include/sensorcommands.hpp
@@ -133,6 +133,8 @@
ipmiCmdSetSensorReadingAndEventStatus = 0x30,
};
+namespace ipmi
+{
extern SensorSubTree sensorTree;
static ipmi_ret_t getSensorConnection(uint8_t sensnum, std::string &connection,
std::string &path)
@@ -164,3 +166,4 @@
return 0;
}
+} // namespace ipmi