diff options
| author | Matt Spinler <spinler@us.ibm.com> | 2017-10-17 10:09:18 -0500 |
|---|---|---|
| committer | Matt Spinler <spinler@us.ibm.com> | 2017-10-24 12:01:38 -0500 |
| commit | b4e6557fc98f9163becc79bc6bc037e525b046ea (patch) | |
| tree | c16ae20e958560b4c27a0e9a1f78312fbe45e55d /mainloop.cpp | |
| parent | b778df0ec874a2c73ae7dbed458bd5a04a3165f9 (diff) | |
| download | phosphor-hwmon-b4e6557fc98f9163becc79bc6bc037e525b046ea.tar.gz phosphor-hwmon-b4e6557fc98f9163becc79bc6bc037e525b046ea.zip | |
Read fan target sysfs value on startup
When creating the object that represents the
Control.FanSpeed interface for a fan, read the
target fan speed out of sysfs and save it in
the object so it shows up in D-Bus immediately.
Previously the Target property would have a value
of zero until another application wrote it, leaving
a window where the D-Bus property wouldn't match
the underlying sysfs file value.
Change-Id: I08b149840c2cf731bc48f89118622fa63222600e
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Diffstat (limited to 'mainloop.cpp')
| -rw-r--r-- | mainloop.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mainloop.cpp b/mainloop.cpp index 1190d85..bf2cacc 100644 --- a/mainloop.cpp +++ b/mainloop.cpp @@ -346,7 +346,7 @@ void MainLoop::run() addThreshold<CriticalObject>(i.first.first, id, sensorValue, info); auto target = addTarget<hwmon::FanSpeed>( - i.first, ioAccess.path(), _devPath, info); + i.first, ioAccess, _devPath, info); if (target) { |

