diff options
author | Matt Spinler <spinler@us.ibm.com> | 2018-03-05 12:01:48 -0600 |
---|---|---|
committer | Matt Spinler <spinler@us.ibm.com> | 2018-03-05 12:10:19 -0600 |
commit | 31dbe06252d4fe41815fe783e4f720ce0333cef3 (patch) | |
tree | a16cb35206469a34eadb33e990c863e1b7cfd3b2 | |
parent | a7e2c1e5c1e94246ae55313fc361d30b0e1a6165 (diff) | |
download | phosphor-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.cpp | 2 | ||||
-rw-r--r-- | sysfs.cpp | 2 | ||||
-rw-r--r-- | sysfs.hpp | 4 | ||||
-rw-r--r-- | test/find_hwmon.cpp | 2 |
4 files changed, 5 insertions, 5 deletions
@@ -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) @@ -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"; @@ -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) { |