diff options
Diffstat (limited to 'meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/0003-add-new-dimm-fields.patch')
-rw-r--r-- | meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/0003-add-new-dimm-fields.patch | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/0003-add-new-dimm-fields.patch b/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/0003-add-new-dimm-fields.patch deleted file mode 100644 index 13b880457e..0000000000 --- a/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/0003-add-new-dimm-fields.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 824ef06312f5457fa6ab7d8ef08d160f3dc888a9 Mon Sep 17 00:00:00 2001 -From: eportnov <eportnov@ibs.ru> -Date: Fri, 8 Jul 2022 16:30:51 +0300 -Subject: [PATCH] add new dimm fields - ---- - redfish-core/lib/memory.hpp | 25 ++++++++++++++++++++++++- - 1 file changed, 24 insertions(+), 1 deletion(-) - -diff --git a/redfish-core/lib/memory.hpp b/redfish-core/lib/memory.hpp -index 3c10130e5..be3af6fb3 100644 ---- a/redfish-core/lib/memory.hpp -+++ b/redfish-core/lib/memory.hpp -@@ -31,6 +31,10 @@ namespace redfish - - inline std::string translateMemoryTypeToRedfish(const std::string& memoryType) - { -+ if (memoryType == "xyz.openbmc_project.Inventory.Item.Dimm.DeviceType.DRAM") -+ { -+ return "DRAM"; -+ } - if (memoryType == "xyz.openbmc_project.Inventory.Item.Dimm.DeviceType.DDR") - { - return "DDR"; -@@ -470,6 +474,7 @@ inline void - messages::internalError(aResp->res); - return; - } -+ aResp->res.jsonValue["MemorySize"] = (*memorySize); - aResp->res.jsonValue[jsonPtr]["CapacityMiB"] = (*memorySize >> 10); - } - else if (property.first == "PartNumber") -@@ -634,7 +639,7 @@ inline void - // so just leave off - if (!memoryDeviceType.empty()) - { -- aResp->res.jsonValue[jsonPtr]["MemoryDeviceType"] = -+ aResp->res.jsonValue[jsonPtr]["MemoryType"] = - memoryDeviceType; - } - if (value->find("DDR") != std::string::npos) -@@ -647,6 +652,24 @@ inline void - } - } - } -+ else if (property.first == "Model") -+ { -+ const auto* value = -+ std::get_if<std::string>(&property.second); -+ if (value != nullptr) -+ { -+ aResp->res.jsonValue["Model"] = *value; -+ } -+ } -+ else if (property.first == "Description") -+ { -+ const auto* value = -+ std::get_if<std::string>(&property.second); -+ if (value != nullptr) -+ { -+ aResp->res.jsonValue["Description"] = *value; -+ } -+ } - // memory location interface - else if (property.first == "Channel" || - property.first == "MemoryController" || --- -2.35.1 - |