Don't exit program on sysfs read failures.

We have an unreliable fan in one of the test systems and at present if
the sysfs entry is unavailable or returns failure, then the program will
exit.  The program could be serving many sensors, and any one failure
will cause it to exit.  This is true not only when initially creating
the sensors, but also if any sensor read fails at run-time.

Testing:  I verified the program logged the failures, which may not
be ideal if there is a buggy sensor, but, I also ran it and managed
to catch it where the sensor wasn't there initially and it cleanly
reported only the sensors that were responsive and didn't just exit.

There is certainly a case to be made for re-scanning periodically if the
sensor returns or there was a timing issue, and there is a separate bug
for that.  This commit means only to make the program more robust on
failure.

Change-Id: I310a3e3c0e0ea86e439341a296b741ded18f46f2
Signed-off-by: Patrick Venture <venture@google.com>
6 files changed
tree: cfd44aa2872a55986db5a90392837f304c4d2190
  1. test/
  2. .gitignore
  3. argument.cpp
  4. argument.hpp
  5. bootstrap.sh
  6. configure.ac
  7. env.cpp
  8. env.hpp
  9. fan_speed.cpp
  10. fan_speed.hpp
  11. hwmon.hpp
  12. interface.hpp
  13. LICENSE
  14. mainloop.cpp
  15. mainloop.hpp
  16. Makefile.am
  17. readd.cpp
  18. README.md
  19. sensorset.cpp
  20. sensorset.hpp
  21. sysfs.cpp
  22. sysfs.hpp
  23. targets.hpp
  24. thresholds.hpp
  25. util.hpp
README.md

Exposes generic hwmon entries as DBus objects.

To Build

To build this package, do the following steps:

    1. ./bootstrap.sh
    2. ./configure ${CONFIGURE_FLAGS}
    3. make

To full clean the repository again run `./bootstrap.sh clean`.