commit | 6cb732a31b7664089124b00e806311768bc24a87 | [log] [tgz] |
---|---|---|
author | Ed Tanous <edtanous@google.com> | Thu Feb 18 15:33:51 2021 -0800 |
committer | Ed Tanous <edtanous@google.com> | Thu Feb 18 15:44:09 2021 -0800 |
tree | 0e0af04ba4211c609e32de23d3e30aa3cf8c4854 | |
parent | 8a57ec0915f92194acf867d9fbdda653aacbf27d [diff] |
Fix bug in name escaping for PSUSensor PSU sensor has a bug where if the name includes any invalid characters, it crashes when attempting to launch. This is a problem, and very much not expected behavior. The root cause of this is that PSU combine event is creating a dbus API path from the object name, but neglects to escape it properly. The previous method to escape this was inlined inside sensor.hpp, so that has been promoted to a new utility function, escapeForDbus which can return an escaped name string to use in paths. Through the course of adding this to the sensors namespace and including it, it turns out that "sensors" is overloaded, and including it causes both compile time errors from the overloaded name, and link time errors from the lack of "inline" on the utility methods. This commit also as a matter of cleanup moves everything in SensorPaths.hpp into an alternative file, SensorPaths.cpp, and includes that file in sensor utils. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Id9ed915e7e0e13ee7bded67a785ab0fa58982ca8
dbus-sensors is a collection of sensor applications that provide the xyz.openbmc_project.Sensor collection of interfaces. They read sensor values from hwmon, d-bus, or direct driver access to provide readings. Some advance non-sensor features such as fan presence, pwm control, and automatic cpu detection (x86) are also supported.
runtime re-configurable from d-bus (entity-manager or the like)
isolated: each sensor type is isolated into its own daemon, so a bug in one sensor is unlikely to affect another, and single sensor modifications are possible
async single-threaded: uses sdbusplus/asio bindings
multiple data inputs: hwmon, d-bus, direct driver access