summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Spinler <spinler@us.ibm.com>2018-03-05 12:01:48 -0600
committerMatt Spinler <spinler@us.ibm.com>2018-03-05 12:10:19 -0600
commit31dbe06252d4fe41815fe783e4f720ce0333cef3 (patch)
treea16cb35206469a34eadb33e990c863e1b7cfd3b2
parenta7e2c1e5c1e94246ae55313fc361d30b0e1a6165 (diff)
downloadphosphor-hwmon-31dbe06252d4fe41815fe783e4f720ce0333cef3.tar.gz
phosphor-hwmon-31dbe06252d4fe41815fe783e4f720ce0333cef3.zip
Rename function
A future commit will add a new function to find the hwmon device from a different type of path, so clarify the current function name in preparation. Tested: Compiled Change-Id: I3c990f4a91b12e592e22818b085dcd3736e5fcde Signed-off-by: Matt Spinler <spinler@us.ibm.com>
-rw-r--r--readd.cpp2
-rw-r--r--sysfs.cpp2
-rw-r--r--sysfs.hpp4
-rw-r--r--test/find_hwmon.cpp2
4 files changed, 5 insertions, 5 deletions
diff --git a/readd.cpp b/readd.cpp
index c7d0466..454ac62 100644
--- a/readd.cpp
+++ b/readd.cpp
@@ -37,7 +37,7 @@ int main(int argc, char** argv)
auto path = (*options)["of-name"];
if (path != ArgumentParser::empty_string)
{
- path = sysfs::findHwmon(path);
+ path = sysfs::findHwmonFromOFPath(path);
}
if (path == ArgumentParser::empty_string)
diff --git a/sysfs.cpp b/sysfs.cpp
index af5f86a..4ea32b2 100644
--- a/sysfs.cpp
+++ b/sysfs.cpp
@@ -197,7 +197,7 @@ std::string findCalloutPath(const std::string& instancePath)
return emptyString;
}
-std::string findHwmon(const std::string& ofNode)
+std::string findHwmonFromOFPath(const std::string& ofNode)
{
static constexpr auto hwmonRoot = "/sys/class/hwmon";
diff --git a/sysfs.hpp b/sysfs.hpp
index 3bcca53..e673205 100644
--- a/sysfs.hpp
+++ b/sysfs.hpp
@@ -39,7 +39,7 @@ std::string findPhandleMatch(
const std::string& iochanneldir,
const std::string& phandledir);
-/** @brief Find hwmon instances
+/** @brief Find hwmon instances from an open-firmware device tree path
*
* Look for a matching hwmon instance given an
* open firmware device path.
@@ -49,7 +49,7 @@ std::string findPhandleMatch(
* @returns[in] - The hwmon instance path or an empty
* string if no match is found.
*/
-std::string findHwmon(const std::string& ofNode);
+std::string findHwmonFromOFPath(const std::string& ofNode);
/** @brief Return the path to use for a call out.
*
diff --git a/test/find_hwmon.cpp b/test/find_hwmon.cpp
index fbb203f..1142ad1 100644
--- a/test/find_hwmon.cpp
+++ b/test/find_hwmon.cpp
@@ -27,7 +27,7 @@ int main(int argc, char* argv[])
try
{
- std::cout << sysfs::findHwmon(argv[1]) << '\n';
+ std::cout << sysfs::findHwmonFromOFPath(argv[1]) << '\n';
}
catch (const std::exception& e)
{
OpenPOWER on IntegriCloud