Rename function `formatFRU` to `formatIPMIFRU`
`FruDevice` can parse FRU content more than IPMI format.
Rename the function to a more specific name.
Signed-off-by: Michael Shen <gpgpgp@google.com>
Change-Id: If24f9cb0d51bb18c924b800fee595f52f85673dc
diff --git a/include/FruUtils.hpp b/include/FruUtils.hpp
index 906b77e..05a8bee 100644
--- a/include/FruUtils.hpp
+++ b/include/FruUtils.hpp
@@ -109,7 +109,7 @@
bool checkLangEng(uint8_t lang);
resCodes
- formatFRU(const std::vector<uint8_t>& fruBytes,
+ formatIPMIFRU(const std::vector<uint8_t>& fruBytes,
boost::container::flat_map<std::string, std::string>& result);
std::vector<uint8_t>& getFRUInfo(const uint8_t& bus, const uint8_t& address);
diff --git a/src/FruDevice.cpp b/src/FruDevice.cpp
index 3774a2d..dc7b77f 100644
--- a/src/FruDevice.cpp
+++ b/src/FruDevice.cpp
@@ -654,7 +654,7 @@
std::shared_ptr<sdbusplus::asio::connection>& systemBus)
{
boost::container::flat_map<std::string, std::string> formattedFRU;
- resCodes res = formatFRU(device, formattedFRU);
+ resCodes res = formatIPMIFRU(device, formattedFRU);
if (res == resCodes::resErr)
{
std::cerr << "failed to parse FRU for device at bus " << bus
@@ -830,7 +830,7 @@
return false;
}
// verify legal fru by running it through fru parsing logic
- if (formatFRU(fru, tmp) != resCodes::resOK)
+ if (formatIPMIFRU(fru, tmp) != resCodes::resOK)
{
std::cerr << "Invalid fru format during writeFRU\n";
return false;
diff --git a/src/FruUtils.cpp b/src/FruUtils.cpp
index 940f8c8..1152f87 100644
--- a/src/FruUtils.cpp
+++ b/src/FruUtils.cpp
@@ -256,8 +256,9 @@
return true;
}
-resCodes formatFRU(const std::vector<uint8_t>& fruBytes,
- boost::container::flat_map<std::string, std::string>& result)
+resCodes
+ formatIPMIFRU(const std::vector<uint8_t>& fruBytes,
+ boost::container::flat_map<std::string, std::string>& result)
{
resCodes ret = resCodes::resOK;
if (fruBytes.size() <= fruBlockSize)