Move global variable busMap to FruUtil.hpp

Moved the static global variable busMap from FruDevice.cpp to
FruUtil.hpp to make it accessible for fru and ipmb-fru daemons.

Seperating patches into small patches to achieve moving common
functions/Variables from FruDevice.cpp to FruUtils.cpp.
https://gerrit.openbmc-project.xyz/c/openbmc/entity-manager/+/47246

Signed-off-by: Kumar Thangavel <thangavel.k@hcl.com>
Change-Id: Ie424944edeb44c98a8996d0a8c898dd6140b53ee
diff --git a/include/FruUtils.hpp b/include/FruUtils.hpp
index 05a8bee..ea1233b 100644
--- a/include/FruUtils.hpp
+++ b/include/FruUtils.hpp
@@ -32,6 +32,11 @@
 
 constexpr size_t fruBlockSize = 8;
 
+using DeviceMap = boost::container::flat_map<int, std::vector<uint8_t>>;
+using BusMap = boost::container::flat_map<int, std::shared_ptr<DeviceMap>>;
+
+inline BusMap busMap;
+
 enum class DecodeState
 {
     ok,
@@ -138,8 +143,7 @@
 ///        returns the offset at which a header was found
 /// \return whether a header was found
 bool findFRUHeader(int flag, int file, uint16_t address,
-                   const ReadBlockFunc& readBlock,
-                   const std::string& errorHelp,
+                   const ReadBlockFunc& readBlock, const std::string& errorHelp,
                    std::array<uint8_t, I2C_SMBUS_BLOCK_MAX>& blockData,
                    uint16_t& baseOffset);
 
diff --git a/src/FruDevice.cpp b/src/FruDevice.cpp
index b1c4d1d..8d825a9 100644
--- a/src/FruDevice.cpp
+++ b/src/FruDevice.cpp
@@ -70,14 +70,9 @@
 
 const static constexpr char* i2CDevLocation = "/dev";
 
-using DeviceMap = boost::container::flat_map<int, std::vector<uint8_t>>;
-using BusMap = boost::container::flat_map<int, std::shared_ptr<DeviceMap>>;
-
 static std::set<size_t> busBlacklist;
 struct FindDevicesWithCallback;
 
-static BusMap busMap;
-
 static boost::container::flat_map<
     std::pair<size_t, size_t>, std::shared_ptr<sdbusplus::asio::dbus_interface>>
     foundDevices;