Add a helper function getFruData to updateFRUProperty
Refactoring updateFRUProperty function and created a new helper
function getFruData. Moved this function to fru_utils.cpp as it
is common for all fru-device deamons and avoid code duplication.
This patch is created based on suggestion on the below patch.
https://gerrit.openbmc.org/c/openbmc/entity-manager/+/51555
TESTED : Built Facebook YosemiteV2 images and loaded
on the target hardware. Verified all the fru's read and write.
Signed-off-by: Kumar Thangavel <thangavel.k@hcl.com>
Change-Id: I7514469d5798c68efce7353ca486195016cacf81
diff --git a/include/fru_utils.hpp b/include/fru_utils.hpp
index 64765b0..e2c6a54 100644
--- a/include/fru_utils.hpp
+++ b/include/fru_utils.hpp
@@ -222,3 +222,5 @@
std::vector<uint8_t>& device,
boost::container::flat_map<std::string, std::string>& formattedFRU,
uint32_t bus, uint32_t address, size_t& unknownBusObjectCount);
+
+bool getFruData(std::vector<uint8_t>& fruData, uint32_t bus, uint32_t address);