From 13f1dc28f162c74cc0eac6673d3c12d5195238d1 Mon Sep 17 00:00:00 2001 From: michael-west Date: Sat, 6 Feb 2021 14:34:19 -0800 Subject: mpmd: Skip find if "resource" key is specified MPM devices were being discovered when trying to locate PCIe connected devices. Adding filter to exclude them if the "resource" key is specified in the device address arguments. Replaces "lib: disable non pcie types in find with resource" to reduce impact to older devices and remove API change. Signed-off-by: michael-west --- host/lib/types/device_addr.cpp | 9 --------- 1 file changed, 9 deletions(-) (limited to 'host/lib/types') diff --git a/host/lib/types/device_addr.cpp b/host/lib/types/device_addr.cpp index 3a7f80ed9..d5e9ce0d4 100644 --- a/host/lib/types/device_addr.cpp +++ b/host/lib/types/device_addr.cpp @@ -9,7 +9,6 @@ #include #include #include -#include #include #include #include @@ -52,14 +51,6 @@ device_addr_t::device_addr_t(const std::map& info) } } -bool device_addr_t::has_key_with_prefix(const std::string& prefix) const -{ - auto dev_keys = this->keys(); - return std::any_of(dev_keys.begin(), dev_keys.end(), [prefix](const auto& key) { - return key.substr(0, prefix.size()) == prefix; - }); -} - std::string device_addr_t::to_pp_string(void) const { if (this->size() == 0) -- cgit v1.2.3