diff options
| author | Patrick Venture <venture@google.com> | 2018-04-17 19:15:05 -0700 |
|---|---|---|
| committer | Patrick Venture <venture@google.com> | 2018-04-18 14:06:11 -0700 |
| commit | 7a5285de708b2f46d47f37920c784314b4ad55aa (patch) | |
| tree | 08750f56b723c88d653a1d6f963645784667e5d6 /mainloop.cpp | |
| parent | 73a50c7f1cd02fca7cbc69e6304514157c59fa63 (diff) | |
| download | phosphor-hwmon-7a5285de708b2f46d47f37920c784314b4ad55aa.tar.gz phosphor-hwmon-7a5285de708b2f46d47f37920c784314b4ad55aa.zip | |
move getEnv methods into env namespace
Move the getEnv(...) methods into the env namespace,
for consistency.
Change-Id: I4055d9456c17f8b20071cdee1b8e531c10fb0c7e
Signed-off-by: Patrick Venture <venture@google.com>
Diffstat (limited to 'mainloop.cpp')
| -rw-r--r-- | mainloop.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/mainloop.cpp b/mainloop.cpp index 62467fd..99c8020 100644 --- a/mainloop.cpp +++ b/mainloop.cpp @@ -219,7 +219,7 @@ auto addValue(const SensorSet::key_type& sensor, auto& obj = std::get<Object>(info); auto& objPath = std::get<std::string>(info); - auto senRmRCs = getEnv("REMOVERCS", sensor); + auto senRmRCs = env::getEnv("REMOVERCS", sensor); if (!senRmRCs.empty()) { // Add sensor removal return codes defined per sensor @@ -236,13 +236,13 @@ auto addValue(const SensorSet::key_type& sensor, std::get<std::chrono::milliseconds>(retryIO), isOCC); - auto gain = getEnv("GAIN", sensor); + auto gain = env::getEnv("GAIN", sensor); if (!gain.empty()) { sensorAdjusts[sensor].gain = std::stod(gain); } - auto offset = getEnv("OFFSET", sensor); + auto offset = env::getEnv("OFFSET", sensor); if (!offset.empty()) { sensorAdjusts[sensor].offset = std::stoi(offset); @@ -260,12 +260,12 @@ auto addValue(const SensorSet::key_type& sensor, iface->scale(getScale(attrs)); } - auto maxValue = getEnv("MAXVALUE", sensor); + auto maxValue = env::getEnv("MAXVALUE", sensor); if(!maxValue.empty()) { iface->maxValue(std::stoll(maxValue)); } - auto minValue = getEnv("MINVALUE", sensor); + auto minValue = env::getEnv("MINVALUE", sensor); if(!minValue.empty()) { iface->minValue(std::stoll(minValue)); @@ -304,10 +304,10 @@ void MainLoop::getObject(SensorSet::container_t::const_reference sensor) * doesn't exist, then the name of DBUS object is the value of the env * variable LABEL_<item><X>. */ - auto mode = getEnv("MODE", sensor.first); + auto mode = env::getEnv("MODE", sensor.first); if (!mode.compare(hwmon::entry::label)) { - id = getIndirectID( + id = env::getIndirectID( _hwmonRoot + '/' + _instance + '/', sensor.first); if (id.empty()) @@ -321,7 +321,7 @@ void MainLoop::getObject(SensorSet::container_t::const_reference sensor) id = (id.empty()) ? sensor.first.second : id; // Ignore inputs without a label. - label = getEnv("LABEL", sensor.first.first, id); + label = env::getEnv("LABEL", sensor.first.first, id); if (label.empty()) { return; |

