summaryrefslogtreecommitdiffstats
path: root/env.cpp
diff options
context:
space:
mode:
authorMatt Spinler <spinler@us.ibm.com>2017-10-12 16:33:22 -0500
committerMatt Spinler <spinler@us.ibm.com>2017-10-17 10:03:05 -0500
commit049e0dd2f70b5bf6255aa6291ab761fb62e124fe (patch)
tree9c6653b23b477be899735d5b98d5c61b01cf67f6 /env.cpp
parent325456cb281ffec46286a0cbd398e0073f4a8274 (diff)
downloadphosphor-hwmon-049e0dd2f70b5bf6255aa6291ab761fb62e124fe.tar.gz
phosphor-hwmon-049e0dd2f70b5bf6255aa6291ab761fb62e124fe.zip
Add another version of getEnv
The new version takes the type and ID parameters separately as opposed to together in a key_type. Change-Id: I7796e8e6d680ffb640028e91eb3dcc8e7d99bc2e Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Diffstat (limited to 'env.cpp')
-rw-r--r--env.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/env.cpp b/env.cpp
index 5745e16..efd081b 100644
--- a/env.cpp
+++ b/env.cpp
@@ -39,6 +39,15 @@ std::string getEnv(
return value;
}
+std::string getEnv(
+ const char* prefix,
+ const std::string& type,
+ const std::string& id)
+{
+ SensorSet::key_type sensor{type, id};
+ return getEnv(prefix, sensor);
+}
+
std::string getIndirectLabelEnv(
const char* prefix, std::string path, const SensorSet::key_type& sensor)
{
OpenPOWER on IntegriCloud