sysfs: refactor findPhandleMatch

 - Use same indenting style as the rest of the application.
 - Invert branch logic to reduce indent levels.
 - Move logic that does not depend on loop variants outside loop.
 - Fix a bug where the io-channels phandle is read from the wrong file.
 - Remove unnecessary try/catch block around DT IOs (DT is immutable).
 - Export findPhandle so other modules can use it.
 - Document current method limitations.

Change-Id: I34c1c6731a5e2334075b2d25c6583143c2997207
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
2 files changed
tree: 9bb3dc560a3e0b0b7427082c7511b774baefdda7
  1. msl/
  2. test/
  3. .gitignore
  4. argument.cpp
  5. argument.hpp
  6. bootstrap.sh
  7. configure.ac
  8. env.cpp
  9. env.hpp
  10. fan_speed.cpp
  11. fan_speed.hpp
  12. hwmon.hpp
  13. interface.hpp
  14. LICENSE
  15. mainloop.cpp
  16. mainloop.hpp
  17. Makefile.am
  18. readd.cpp
  19. README.md
  20. sensorset.cpp
  21. sensorset.hpp
  22. sysfs.cpp
  23. sysfs.hpp
  24. targets.hpp
  25. thresholds.hpp
  26. 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`.