Follow up on Todo, move path out of base sensor
Not every sensor needs a sysfs path, because of that
move it out of the base class and into the classes that
need it.
Change-Id: I62b7df681e1ee889eb66e371d1cd6094097e9f21
Signed-off-by: James Feist <james.feist@linux.intel.com>
diff --git a/src/HwmonTempSensor.cpp b/src/HwmonTempSensor.cpp
index 8472012..09161e4 100644
--- a/src/HwmonTempSensor.cpp
+++ b/src/HwmonTempSensor.cpp
@@ -40,11 +40,11 @@
boost::asio::io_service& io, const std::string& sensorName,
std::vector<thresholds::Threshold>&& _thresholds,
const std::string& sensorConfiguration) :
- Sensor(boost::replace_all_copy(sensorName, " ", "_"), path,
+ Sensor(boost::replace_all_copy(sensorName, " ", "_"),
std::move(_thresholds), sensorConfiguration, objectType, maxReading,
minReading),
- objServer(objectServer), inputDev(io, open(path.c_str(), O_RDONLY)),
- waitTimer(io), errCount(0)
+ path(path), objServer(objectServer),
+ inputDev(io, open(path.c_str(), O_RDONLY)), waitTimer(io), errCount(0)
{
sensorInterface = objectServer.add_interface(
"/xyz/openbmc_project/sensors/temperature/" + name,