From 1be84a591b51e6c53a7a60230632a6fa0e6775b9 Mon Sep 17 00:00:00 2001 From: Rajaganesh Rathinasabapathi Date: Sat, 11 Jul 2026 08:37:32 +0000 Subject: [PATCH] bmcweb: firmware inventory: fallback when host BIOS version unknown Keep HostVersions multi-host behavior, but fall back to the base Version when the selected host entry is empty or reports Unknown to avoid parity regressions. Signed-off-by: Rajaganesh Rathinasabapathi Change-Id: I7c98a0f424b3497c44122c91f7e4d8ab7f7a6d32 --- redfish-core/lib/update_service.hpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/redfish-core/lib/update_service.hpp b/redfish-core/lib/update_service.hpp index d987c9fb1f..bf1565a550 100644 --- a/redfish-core/lib/update_service.hpp +++ b/redfish-core/lib/update_service.hpp @@ -1327,7 +1327,18 @@ inline void getSoftwareVersion( if (hostVersions != nullptr && hostNumber < hostVersions->size()) { - version = &(*hostVersions)[hostNumber]; + const std::string& hostVersion = (*hostVersions)[hostNumber]; + if (!hostVersion.empty() && + !bmcweb::asciiIEquals(hostVersion, "Unknown")) + { + version = &hostVersion; + } + else + { + BMCWEB_LOG_DEBUG( + "HostVersions[{}] is empty/Unknown, using default BIOS Version", + hostNumber); + } } }