From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 40EF874003D for ; Sat, 23 Mar 2024 12:01:12 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=32Y5AYXoBGhCeoadKfqtIsmALlfZnN6GMBH3ofMpapk=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20240206; t=1711195271; v=1; b=1pL9C8yVoVORmxighyWdJbsPTtpk9isPuzzzPsB9LMPuipfUZuWYkRZ6RJhELeh4ga6o+Jy4 3KdY8f/E9cde6n5dlE6X3PFAYP7VTtYmEpIoe9QNUYmndCTrgHUFD1SfxLyJsGa2QjwcrSn+j/w MZG2/hu795yuTWzJI3+JWfrWt5+2L/IiEetM+i4fL5EVVu1CO3eXWX3gwLi/AIWfmYL+xloYgSr m8Q2OBDgO1Y6IyYywg8c20IQrY7PNotiG8JJnruUOh/zYCO56dJeUq3XAGyZ90eEb1PqvS4LdCg dNXoYQzkilOz66hsIUCOqsoQb8PIqkTn0fg07xwx0zw8A== X-Received: by 127.0.0.2 with SMTP id nQaxYY7687511x5YjghScfz4; Sat, 23 Mar 2024 05:01:11 -0700 X-Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com [209.85.167.48]) by mx.groups.io with SMTP id smtpd.web10.7320.1711195270151205998 for ; Sat, 23 Mar 2024 05:01:10 -0700 X-Received: by mail-lf1-f48.google.com with SMTP id 2adb3069b0e04-513d212f818so3451323e87.2 for ; Sat, 23 Mar 2024 05:01:09 -0700 (PDT) X-Gm-Message-State: eD8OTpdNwglynICcTXpIZ7Ajx7686176AA= X-Google-Smtp-Source: AGHT+IFJ/sMyNfn3zryFbL2Y55Ggaftxp/1gTa+0AEhi2bGnQKMWIZz8lF1mSBnBmSMS9XJa+CMwew== X-Received: by 2002:a05:6512:443:b0:513:c7c7:8799 with SMTP id y3-20020a056512044300b00513c7c78799mr1310508lfk.58.1711195268169; Sat, 23 Mar 2024 05:01:08 -0700 (PDT) X-Received: from localhost.localdomain ([79.164.221.98]) by smtp.gmail.com with ESMTPSA id u11-20020a05651220cb00b005131cf043f8sm266801lfr.155.2024.03.23.05.01.07 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 23 Mar 2024 05:01:07 -0700 (PDT) From: "Mike Maslenkin" To: devel@edk2.groups.io Cc: Mike Maslenkin , Abner Chang , Igor Kulchytskyy , Nickle Wang Subject: [edk2-devel] [edk2-redfish-client][RFC PATCH 3/3] RedfishClientPkg: fix the first node processing in GetRedpathNodeByIndex() Date: Sat, 23 Mar 2024 15:00:50 +0300 Message-Id: <20240323120050.53834-4-mike.maslenkin@gmail.com> In-Reply-To: <20240323120050.53834-1-mike.maslenkin@gmail.com> References: <20240323120050.53834-1-mike.maslenkin@gmail.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Sat, 23 Mar 2024 05:01:10 -0700 Reply-To: devel@edk2.groups.io,mike.maslenkin@gmail.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=1pL9C8yV; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io For node with index 0, the result of this function contains leading L'/' character. But for other nodes no such characters (separators) returned. Make processing of all fields consistent. After this patch the debug output for specified URI is the following: @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 Cc: Abner Chang Cc: Igor Kulchytskyy Cc: Nickle Wang Signed-off-by: Mike Maslenkin --- .../Library/RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatu= reUtilityLib.c b/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishF= eatureUtilityLib.c index b0a3b20a40bd..c55dc2ee6d05 100644 --- a/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtili= tyLib.c +++ b/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtili= tyLib.c @@ -1304,7 +1304,7 @@ GetRedpathNodeByIndex ( NumberNodes =3D 0;=0D StringLen =3D StrLen (NodeString);=0D StringIndex =3D 1; // ConfigLang always starts with '/'.=0D - NodeStart =3D NodeString;=0D + NodeStart =3D NodeString + StringIndex;=0D if (EndOfNodePtr !=3D NULL) {=0D *EndOfNodePtr =3D NULL;=0D }=0D --=20 2.32.0 (Apple Git-132) -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#117068): https://edk2.groups.io/g/devel/message/117068 Mute This Topic: https://groups.io/mt/105101993/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-