Fix display of sensor units

An earlier change modified getSensorTypeStringFromPath() and
removed the comparison function for the sensor units map.
Because they are char* and the type string failed, the default
sort and find map functions don't work and sensor units appear
as unspecified.

This change fixes the type string and adds the char* comparison
function back in so find() can correctly find the sensor unit.

Tested: Ran the 'sensor list' command and verified that the units
are correctly displayed.

Change-Id: Iac29b763dfd899ced9cb8885ddfa0f2edb8c4d64
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
diff --git a/include/sdrutils.hpp b/include/sdrutils.hpp
index 8b93e9b..6510d6c 100644
--- a/include/sdrutils.hpp
+++ b/include/sdrutils.hpp
@@ -94,10 +94,10 @@
     // get sensor type string from path, path is defined as
     // /xyz/openbmc_project/sensors/<type>/label
     size_t typeEnd = path.rfind("/");
-    size_t typeStart = path.rfind("/", typeEnd - 1);
+    size_t typeStart = path.rfind("/", typeEnd - 1) + 1;
     if (typeEnd != std::string::npos && typeStart != std::string::npos)
     {
-        return path.substr(typeStart + 1, typeEnd - typeStart);
+        return path.substr(typeStart, typeEnd - typeStart);
     }
     return path;
 }