conf change: sensors: read and write path rename

Rename the readpath and writepath for camelcase styling to make all
configuration variables consistent.

Change-Id: I33f475075c8f40cd2029a5c0bfda950846cd5d44
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/sensors/builder.cpp b/sensors/builder.cpp
index 966a581..4ba1837 100644
--- a/sensors/builder.cpp
+++ b/sensors/builder.cpp
@@ -53,10 +53,10 @@
         const struct SensorConfig* info = &it.second;
 
         std::cerr << "Sensor: " << name << " " << info->type << " ";
-        std::cerr << info->readpath << " " << info->writepath << "\n";
+        std::cerr << info->readPath << " " << info->writePath << "\n";
 
-        IOInterfaceType rtype = getReadInterfaceType(info->readpath);
-        IOInterfaceType wtype = getWriteInterfaceType(info->writepath);
+        IOInterfaceType rtype = getReadInterfaceType(info->readPath);
+        IOInterfaceType wtype = getWriteInterfaceType(info->writePath);
 
         // fan sensors can be ready any way and written others.
         // fan sensors are the only sensors this is designed to write.
@@ -80,7 +80,7 @@
                 // These are a special case for read-only.
                 break;
             case IOInterfaceType::SYSFS:
-                ri = std::make_unique<SysFsRead>(info->readpath);
+                ri = std::make_unique<SysFsRead>(info->readPath);
                 break;
             default:
                 ri = std::make_unique<WriteOnly>();
@@ -95,11 +95,11 @@
                     if (info->max > 0)
                     {
                         wi = std::make_unique<SysFsWritePercent>(
-                            info->writepath, info->min, info->max);
+                            info->writePath, info->min, info->max);
                     }
                     else
                     {
-                        wi = std::make_unique<SysFsWrite>(info->writepath,
+                        wi = std::make_unique<SysFsWrite>(info->writePath,
                                                           info->min, info->max);
                     }
 
@@ -108,19 +108,19 @@
                     if (info->max > 0)
                     {
                         wi = DbusWritePercent::createDbusWrite(
-                            info->writepath, info->min, info->max, helper);
+                            info->writePath, info->min, info->max, helper);
                     }
                     else
                     {
                         wi = DbusWrite::createDbusWrite(
-                            info->writepath, info->min, info->max, helper);
+                            info->writePath, info->min, info->max, helper);
                     }
 
                     if (wi == nullptr)
                     {
                         throw SensorBuildException(
                             "Unable to create write dbus interface for path: " +
-                            info->writepath);
+                            info->writePath);
                     }
 
                     break;
@@ -137,19 +137,19 @@
         {
             // These sensors are read-only, but only for this application
             // which only writes to fan sensors.
-            std::cerr << info->type << " readpath: " << info->readpath << "\n";
+            std::cerr << info->type << " readPath: " << info->readPath << "\n";
 
             if (IOInterfaceType::EXTERNAL == rtype)
             {
                 std::cerr << "Creating HostSensor: " << name
-                          << " path: " << info->readpath << "\n";
+                          << " path: " << info->readPath << "\n";
 
                 /*
                  * The reason we handle this as a HostSensor is because it's
                  * not quite pluggable; but maybe it could be.
                  */
                 auto sensor = HostSensor::createTemp(
-                    name, info->timeout, hostSensorBus, info->readpath.c_str(),
+                    name, info->timeout, hostSensorBus, info->readPath.c_str(),
                     deferSignals);
                 mgmr.addSensor(info->type, name, std::move(sensor));
             }
diff --git a/sensors/builderconfig.cpp b/sensors/builderconfig.cpp
index 0c6ed68..5aa18bc 100644
--- a/sensors/builderconfig.cpp
+++ b/sensors/builderconfig.cpp
@@ -75,8 +75,8 @@
              */
             name = sensor.lookup("name").c_str();
             thisOne.type = sensor.lookup("type").c_str();
-            thisOne.readpath = sensor.lookup("readpath").c_str();
-            thisOne.writepath = sensor.lookup("writepath").c_str();
+            thisOne.readPath = sensor.lookup("readPath").c_str();
+            thisOne.writePath = sensor.lookup("writePath").c_str();
 
             /* TODO: Document why this is wonky.  The library probably doesn't
              * like int64_t
diff --git a/sensors/buildjson.cpp b/sensors/buildjson.cpp
index 4bf5ea7..d62edfd 100644
--- a/sensors/buildjson.cpp
+++ b/sensors/buildjson.cpp
@@ -26,17 +26,17 @@
 void from_json(const json& j, SensorConfig& s)
 {
     j.at("type").get_to(s.type);
-    j.at("readpath").get_to(s.readpath);
+    j.at("readPath").get_to(s.readPath);
 
-    /* The writepath field is optional in a configuration */
-    auto writepath = j.find("writepath");
-    if (writepath == j.end())
+    /* The writePath field is optional in a configuration */
+    auto writePath = j.find("writePath");
+    if (writePath == j.end())
     {
-        s.writepath = "";
+        s.writePath = "";
     }
     else
     {
-        j.at("writepath").get_to(s.writepath);
+        j.at("writePath").get_to(s.writePath);
     }
 
     /* The min field is optional in a configuration. */