entity-manager: Add excludedProps to filter out TLBMC message
The string tlbmc in the .json file causes error messages in the entity manager. This patch was added to filter out those error messages.
Tested:
```
Tested on the machine and confirmed that no errors appeared.
```
Google-Bug-Id: 419164757
Change-Id: Ibe5931e9fe7cac9116901d230fe199a998dc4817
Signed-off-by: Shao-Chieh Chao <jieh.sc.chao@fii-na.corp-partner.google.com>
diff --git a/recipes-phosphor/configuration/entity-manager/0008-Add-excludedProps-to-filter-out-tlbmc-information.patch b/recipes-phosphor/configuration/entity-manager/0008-Add-excludedProps-to-filter-out-tlbmc-information.patch
new file mode 100644
index 0000000..1f544fb
--- /dev/null
+++ b/recipes-phosphor/configuration/entity-manager/0008-Add-excludedProps-to-filter-out-tlbmc-information.patch
@@ -0,0 +1,49 @@
+From a34a9e988addcaf2a939a3fb96aa2728cadcba95 Mon Sep 17 00:00:00 2001
+From: Shao-Chieh Chao <jieh.sc.chao@fii-na.corp-partner.google.com>
+Date: Wed, 28 May 2025 10:14:08 +0800
+Subject: [PATCH] Add excludedProps to filter out TLBMC message
+
+---
+ src/entity_manager.cpp | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/src/entity_manager.cpp b/src/entity_manager.cpp
+index 0ccbf74..7af2d8e 100644
+--- a/src/entity_manager.cpp
++++ b/src/entity_manager.cpp
+@@ -46,6 +46,9 @@
+ #include <optional>
+ #include <regex>
+ #include <variant>
++#include <unordered_set>
++#include <string>
++
+ constexpr const char* hostConfigurationDirectory = SYSCONF_DIR "configurations";
+ constexpr const char* configurationDirectory = PACKAGE_DIR "configurations";
+ constexpr const char* schemaDirectory = PACKAGE_DIR "configurations/schemas";
+@@ -69,6 +72,8 @@ using JsonVariantType =
+ int64_t, uint64_t, double, int32_t, uint32_t, int16_t,
+ uint16_t, uint8_t, bool>;
+
++static const std::unordered_set<std::string> excludedProps = { "ProbeV2", "Asset" };
++
+ // store reference to all interfaces so we can destroy them later
+ boost::container::flat_map<
+ std::string, std::vector<std::weak_ptr<sdbusplus::asio::dbus_interface>>>
+@@ -705,9 +710,12 @@ void postToDbus(const nlohmann::json& newConfiguration,
+ std::move(associations)});
+ continue;
+ }
+- populateInterfaceFromJson(systemConfiguration,
++ if (excludedProps.find(propName) == excludedProps.end())
++ {
++ populateInterfaceFromJson(systemConfiguration,
+ jsonPointerPath + propName, iface,
+ propValue, objServer);
++ }
+ }
+ }
+
+--
+2.34.1
+
diff --git a/recipes-phosphor/configuration/entity-manager_%.bbappend b/recipes-phosphor/configuration/entity-manager_%.bbappend
index 7689ba6..53becc5 100644
--- a/recipes-phosphor/configuration/entity-manager_%.bbappend
+++ b/recipes-phosphor/configuration/entity-manager_%.bbappend
@@ -14,6 +14,7 @@
file://0001-Add-parser-for-calibration-OEM-multirecord.patch \
file://0001-Strip-extra-spaces-from-fru.patch \
file://0001-Add-PropagateElementTo-Property-in-EM-Configs.patch \
+ file://0008-Add-excludedProps-to-filter-out-tlbmc-information.patch \
"
USB_DEVICE_OPTION:gbmc := "-Dusb-device=true, -Dusb-device=false, stdplus"