commit | 4d9a35b232f0bfabe961768f346d958399ff0dec | [log] [tgz] |
---|---|---|
author | Brad Bishop <bradleyb@fuzziesquirrel.com> | Tue Nov 14 22:33:03 2017 -0500 |
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | Tue Nov 14 23:00:44 2017 -0500 |
tree | 060434ea4946d470b2f16fb5728dfa3dea78a0db | |
parent | fe17effce3dc91e9d4e33c7aa705aed9e8bc138e [diff] |
Claim a stable well known busname Prior to this patch readd instances claim a busname with a format of: xyz.openbmc_project.Hwmon.Hwmon<N> where N is the hwmon sysfs class instance. This is problematic for client applications that cache sensor object busname mappings for objects provided by readd. When readd instances restart (due to udev events) the hwmon sysfs class index may have changed, resulting in clients connecting to the wrong service instance. Address this by ensuring readd instances claim the same name every time they are started: xyz.openbmc_project.Hwmon-<ID>.Hwmon1 Where ID is a std::hash of the /sys/devices path backing the hwmon instance. Additionally, add a trailing API version as recommended best practice by the D-Bus specification. Change-Id: Idd0057ce883a49c1e828fb54fede27ea14022d6a Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.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.