After processing of nodes was fixed it was revealed that this function is not handling the last node correctly. The problem is that the end of node detected by comparing to L'/', but usually ConfigLang and other properties do not have terminating separator (i.e '/'). So, before this patch the situation was as below:
@Redfish.Settings found: /redfish/v1/Systems/system/Bios/Settings GetNumberOfRedpathNodes: 6 GetRedpathNodeByIndex[0]:/redfish/v1/Systems/system/Bios/Settings GetRedpathNodeByIndex[1]:v1/Systems/system/Bios/Settings GetRedpathNodeByIndex[2]:Systems/system/Bios/Settings GetRedpathNodeByIndex[3]:system/Bios/Settings GetRedpathNodeByIndex[4]:Bios/Settings GetRedpathNodeByIndex[5]:<null string> And after this patch the debug output is: @Redfish.Settings found: /redfish/v1/Systems/system/Bios/Settings GetNumberOfRedpathNodes: 6 GetRedpathNodeByIndex[0]:/redfish/v1/Systems/system/Bios/Settings GetRedpathNodeByIndex[1]:v1/Systems/system/Bios/Settings GetRedpathNodeByIndex[2]:Systems/system/Bios/Settings GetRedpathNodeByIndex[3]:system/Bios/Settings GetRedpathNodeByIndex[4]:Bios/Settings GetRedpathNodeByIndex[5]:Settings The section with Index=5 is found and returned correctly. Cc: Abner Chang <abner.ch...@amd.com> Cc: Igor Kulchytskyy <ig...@ami.com> Cc: Nickle Wang <nick...@nvidia.com> Signed-off-by: Mike Maslenkin <mike.maslen...@gmail.com> --- .../RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.c b/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.c index 3231ef883379..b0a3b20a40bd 100644 --- a/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.c +++ b/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.c @@ -1327,6 +1327,11 @@ GetRedpathNodeByIndex ( StringIndex++; } + if (NumberNodes == Index) { + *EndOfNodePtr = NodeString + StringIndex - 1; + return NodeStart; + } + return (NULL); } -- 2.32.0 (Apple Git-132) -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#117067): https://edk2.groups.io/g/devel/message/117067 Mute This Topic: https://groups.io/mt/105101992/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-