commit | c8a8e0102e1bb9dd1e231f809e6327513eea3559 | [log] [tgz] |
---|---|---|
author | Matt Spinler <spinler@us.ibm.com> | Thu Dec 14 10:22:22 2017 -0600 |
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | Wed Jan 17 01:11:14 2018 +0000 |
tree | f45286f2a2fbb828ce105c618b6a39af755240bb | |
parent | 26d21731c292a02ec71480fade9a06658160eafb [diff] |
Clear errno before reading/writing Ensure the errno is cleared before accessing the sysfs file, so exceptions thrown without setting an errno can be recognized as such. Without this, the errno could still be set to a nonzero value from a previous operation, and the error handling code would think it happened on the current operation. The difference being if there is a nonzero errno a Read/WriteFailure error will be logged, and if zero the exception will be rethrown. Change-Id: Ia958376ca80484d4d594872ab8ab0154d1b767ca Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Exposes generic hwmon entries as DBus objects.
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`.
To enable the use of Linux features like cgroups prioritization and udev/systemd control, one instance of phosphor-hwmon is intended to be run per hwmon sysfs class instance. This requires an algorithm for selecting a stable, well-known D-Bus busname. The algorithm is <PREFIX>-<ID>.Hwmon<N> where PREFIX is an autoconf configurable prefix (BUSNAME_PREFIX, xyz.openbmc_project by default), ID is a std::hash of the /sys/devices path backing the hwmon class instance, and N is the implemented phosphor-hwmon D-Bus API version.