Fix for devices behind the mux being wrongly detected on lower bus addresses
The scanning of the buses was changed to be now sorted by bus number
irrespective of whether the device is behind a mux or not. Also, if a device
was already found on a lower numbered bus and address, FruDevice does not add
it again to the DBus
Signed-off-by: Nikhil Potade <nikhil.potade@linux.intel.com>
Change-Id: Iee492e07dcb1aad0d02897e5a2f4f83b2cfd0154
diff --git a/include/Utils.hpp b/include/Utils.hpp
index c90cddb..e57d146 100644
--- a/include/Utils.hpp
+++ b/include/Utils.hpp
@@ -31,6 +31,10 @@
const std::string& matchString,
std::vector<std::filesystem::path>& foundPaths);
+bool getI2cDevicePaths(
+ const std::filesystem::path& dirPath,
+ boost::container::flat_map<size_t, std::filesystem::path>& busPaths);
+
bool validateJson(const nlohmann::json& schemaFile,
const nlohmann::json& input);
diff --git a/include/VariantVisitors.hpp b/include/VariantVisitors.hpp
index 935803e..fffb30c 100644
--- a/include/VariantVisitors.hpp
+++ b/include/VariantVisitors.hpp
@@ -52,7 +52,7 @@
template <typename T>
unsigned int operator()(const T& t) const
{
- return static_cast<int>(t);
+ return static_cast<unsigned int>(t);
}
};
template <>