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>
diff --git a/mainloop.cpp b/mainloop.cpp
index 62467fd..99c8020 100644
--- a/mainloop.cpp
+++ b/mainloop.cpp
@@ -219,7 +219,7 @@
     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 @@
             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 @@
         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 @@
      * 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 @@
     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;