Remove Configuration interface prefix from utils APIs
This eliminates some repetitive verbosity from daemons that handle a lot
of different sensor types (such as hwmontempsensor and psusensor). It
also positions us to more cleanly use a single data structure for both
existing APIs like GetSensorConfiguration() and
setupPropertiesChangedMatches(), as well as upcoming I2C
device-management support.
Tested: hwmontempsensor and adcsensor on romed8hm3 continue to behave as
they did previously.
Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Change-Id: I9d80475ca4160c8d2ff0afab942709496d51238d
diff --git a/src/ExternalSensorMain.cpp b/src/ExternalSensorMain.cpp
index e04fc78..e79098f 100644
--- a/src/ExternalSensorMain.cpp
+++ b/src/ExternalSensorMain.cpp
@@ -51,8 +51,7 @@
static constexpr bool debug = false;
-static const char* sensorType =
- "xyz.openbmc_project.Configuration.ExternalSensor";
+static const char* sensorType = "ExternalSensor";
void updateReaper(boost::container::flat_map<
std::string, std::shared_ptr<ExternalSensor>>& sensors,
@@ -172,7 +171,7 @@
const std::string& interfacePath = sensor.first.str;
const SensorData& sensorData = sensor.second;
- auto sensorBase = sensorData.find(sensorType);
+ auto sensorBase = sensorData.find(configInterfaceName(sensorType));
if (sensorBase == sensorData.end())
{
std::cerr << "Base configuration not found for "