Change SysfsValue to HWMon::attribute
There is no need to read all of the files for every value we want.
Change-Id: I307ead2177c5fce130aa653d5098663063d71cad
diff --git a/src/ietf-hardware/IETFHardware.cpp b/src/ietf-hardware/IETFHardware.cpp
index 618995b..43a79d7 100644
--- a/src/ietf-hardware/IETFHardware.cpp
+++ b/src/ietf-hardware/IETFHardware.cpp
@@ -181,7 +181,7 @@
{
DataTree res(m_staticData);
- int64_t sensorValue = m_hwmon->attributes().at(m_sysfsFile);
+ int64_t sensorValue = m_hwmon->attribute(m_sysfsFile);
addSensorValue(res, m_componentName, std::to_string(sensorValue));
return res;