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 258E87803E7 for ; Tue, 26 Mar 2024 12:16:20 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=9To3tTK5x4ZQi0Ck8UdACKiXbPjnsx6c1j1ZTCmpjT8=; c=relaxed/simple; d=groups.io; h=From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20240206; t=1711455379; v=1; b=3I1LbQqGZMtKhK9ZMv8RSQr9UNG17vUGcf1QFChR9jSeF9wocWa6YcLt69JQnAd2juUicS0A oAXfndeLRHyNGZhliNG2eYmsbU525NB0j7qrHLQgZIIi1gjlGWfGH1CcHD0rOqsVsz9UrKtYRjQ BKb7Cnt71kH91mpI0S1JB0VLwy2Wv7VwImLlAJjHjPDwyl6up5enmumXjXnkPUHR2xl7AJjweuy nCVXKuPhjlkQK3+upXekIFTMheEz86Vmx65iQnjexEFbeYtEl1X3h32Pof3x6rmBcw35Zp014YG uzLYFlB3XMZY82KF93esJdy7e3bdqONP1FidgUP4HZ1jA== X-Received: by 127.0.0.2 with SMTP id I0JbYY7687511xY2Dh6Q6Pu3; Tue, 26 Mar 2024 05:16:19 -0700 X-Received: from NAM02-BN1-obe.outbound.protection.outlook.com (NAM02-BN1-obe.outbound.protection.outlook.com [40.107.212.139]) by mx.groups.io with SMTP id smtpd.web10.7305.1711455379091099080 for ; Tue, 26 Mar 2024 05:16:19 -0700 X-Received: from MW4PR12MB7031.namprd12.prod.outlook.com (2603:10b6:303:1ef::6) by IA0PR12MB8747.namprd12.prod.outlook.com (2603:10b6:208:48b::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.32; Tue, 26 Mar 2024 12:16:13 +0000 X-Received: from MW4PR12MB7031.namprd12.prod.outlook.com ([fe80::fef9:2c9c:21b5:6f50]) by MW4PR12MB7031.namprd12.prod.outlook.com ([fe80::fef9:2c9c:21b5:6f50%2]) with mapi id 15.20.7409.031; Tue, 26 Mar 2024 12:16:13 +0000 From: "Nickle Wang via groups.io" To: Mike Maslenkin , "devel@edk2.groups.io" CC: Abner Chang , Igor Kulchytskyy Subject: Re: [edk2-devel] [edk2-redfish-client][RFC PATCH 1/3] RedfishClientPkg: fix nodes count in GetRedpathNodeByIndex() Thread-Topic: [edk2-redfish-client][RFC PATCH 1/3] RedfishClientPkg: fix nodes count in GetRedpathNodeByIndex() Thread-Index: AQHafRnNPmEtsQ/Hcke0Eu5wJ6r53LFJ9Ixg Date: Tue, 26 Mar 2024 12:16:13 +0000 Message-ID: References: <20240323120050.53834-1-mike.maslenkin@gmail.com> <20240323120050.53834-2-mike.maslenkin@gmail.com> In-Reply-To: <20240323120050.53834-2-mike.maslenkin@gmail.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MW4PR12MB7031:EE_|IA0PR12MB8747:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: PNsvCxcmBihgl8ObeR/agrHG4Au3pYNvoRa72UO5pET4f2ejP3/6omAGpgF46NeD5cuaq/Sw0izZWHJIIuWZ1GnIQ7iHsNR9lnpYaJ/DPEwzRvDtlad2CiPuB7bynkcr05CF7vR2wlJHPZWT3NsTIE+U83h8J78OZLYo9CugwG81SKw2+1eTEh/RJ01XQqI3hHEZGZ2QtmR8ULTYmVaty8cnW3zD62vVnWiUy57IKD9AxnFveGoVgBSsbVf8/aiMQkt27yg3hHvLk/umUchvG00zIXQtzEXFcQUGqPnfvMfG4G2QaZHR6b9B1e9m24TT1NF/RLFtj/aj4mNVJOtfcXNrmbkmCtirY9MnP0Jc1YzmBE+dGVNRCwetohWZCbhTtX0kK0M7qGDSjoPsoPxkB75hZ+yS8bCUVjASL0EI6LOrPrvnGz9zNixFeWf2NvM31rdTF9gK7SgdSLaEIz4EnC4fUK6mmYw04/goFQTlWpU/b/ckqL6RDsQA8sgziUJfPITvRUT6Ra1ZyDupv4aXAo/taks2FMtOXQhusqQFOBS3L/xyrwdZ7IiWJ0JLyRj1SKwrWMCYFPFp9jDAlWni3hlWGocPYPwBpWnMzW4aiDPUn9S9H+MNaK+1WUYyFsYzpbd8zCKSRKtk0mwEPHow8n1OG/vOtiqZrNpeQV6qTuY= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?KGskM6IA69c8Q7COgwMQ9CADs7owAt2jvG+q+FmuLO0LhXgZzFFmajMONbIv?= =?us-ascii?Q?GXDAA5xmU/Zzs50dQLE/0lnraPhcLhwfx2gzQAKGTOoUyDSHxBdtatwWfFuc?= =?us-ascii?Q?aPaL+foTz3/+kbe8oZegUj1/djUHcwpi4gZGWjYSJHjB7uS6PtxIespIKh5z?= =?us-ascii?Q?b7akvS/bc5H2uJbQmVsKdg+YF7Y51bDBPGWpPnAvrO3dV3C1i/t+Yyxy2qtN?= =?us-ascii?Q?Ll3ca6I4fFN+oQRozMcIS8BZckVvWpSPQslMgTefQ0J8OIFCvEbCGeDBL6Rp?= =?us-ascii?Q?lxmt5vWBQAw69KCVgsDgRDU8JSXPPcdAY6ndYB3fonRQg0ZC1MmNEV3z4Wl8?= =?us-ascii?Q?CcTRuueVKTqsuKAbSyzhFHiVejqwrGYCG+tHUgjPMGkS1DuV6h0wKKecUR63?= =?us-ascii?Q?a/b68OXSE0TC5Rfxf1KZjyaHy/u7/qxmF7pekqJfACMXTo9V97zcf9HtfX2n?= =?us-ascii?Q?TylrREsYMjolJS2BqK+ZD92f8ynzguwRbmiTnyCRmiCYm/7YiysBhdRztcC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pPiiYhMsRL0xmcxyZz57JdsY0EA5OVe0rZGuLLGcNMGP?= =?us-ascii?Q?vQWOo+bT8SZ5NrL9vnP79GIPTJDQlKfbQyb2ClgwIygvS0XqBpmFItmaIR8V?= =?us-ascii?Q?5QOp3kS0v0EHaynIrnv7wbpTxXm/ao3P6X2xaVDYhEjK7LVZENsW5SCAwhGw?= =?us-ascii?Q?EATk3enAstsXmZ0dqWo=3D?= MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW4PR12MB7031.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 80b7a02a-4fa5-46ce-d304-08dc4d8e8788 X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Mar 2024 12:16:13.4073 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: TPqRVQYKzJkwZH3/G3tIxaAql4EHmuGNmLPOOwCrGEMY6iSHZe+rStXU2AR7cbVyRLcRfZxVmD5kLukdt0KeMA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR12MB8747 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: Tue, 26 Mar 2024 05:16:19 -0700 Reply-To: devel@edk2.groups.io,nicklew@nvidia.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: N2AXngyuma5lEODnDL0iHOOtx7686176AA= Content-Language: en-US Content-Type: text/plain; charset="us-ascii" 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=3I1LbQqG; dmarc=pass (policy=none) header.from=groups.io; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io Reviewed-by: Nickle Wang Regards, Nickle > -----Original Message----- > From: Mike Maslenkin > Sent: Saturday, March 23, 2024 8:01 PM > To: devel@edk2.groups.io > Cc: Mike Maslenkin ; Abner Chang > ; Igor Kulchytskyy ; Nickle Wang > > Subject: [edk2-redfish-client][RFC PATCH 1/3] RedfishClientPkg: fix nodes= count > in GetRedpathNodeByIndex() >=20 > External email: Use caution opening links or attachments >=20 >=20 > This patch fixes work of GetRedpathNodeByIndex() function with non zero I= ndex > argument. NumberNodes value was not changed after the new node found. Thi= s > means that before this patch modified function worked only in case of Ind= ex =3D 0. >=20 > Debug output for the initial case: >=20 > @Redfish.Settings found:/redfish/v1/Systems/system/Bios/Settings > GetNumberOfRedpathNodes:6 > GetRedpathNodeByIndex[0]:/redfish/v1/Systems/system/Bios/Settings > GetRedpathNodeByIndex[1]: > GetRedpathNodeByIndex[2]: > GetRedpathNodeByIndex[3]: > GetRedpathNodeByIndex[4]: > GetRedpathNodeByIndex[5]: >=20 > After this patch the output is as following: >=20 > @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]: >=20 > Note: it is supposed that caller will set terminating '\0' explicitly at = the next > position pointed by returned EndOfNodePtr value. >=20 > Cc: Abner Chang > Cc: Igor Kulchytskyy > Cc: Nickle Wang > Signed-off-by: Mike Maslenkin > --- > .../Library/RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.c | 1 + > 1 file changed, 1 insertion(+) >=20 > diff --git > a/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtility= Lib.c > b/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtility= Lib.c > index cc2b37b79605..3231ef883379 100644 > --- > a/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtility= Lib.c > +++ b/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUt > +++ ilityLib.c > @@ -1320,6 +1320,7 @@ GetRedpathNodeByIndex ( > return NodeStart; >=20 > } else { >=20 > NodeStart =3D NodeString + StringIndex + 1; >=20 > + NumberNodes++; >=20 > } >=20 > } >=20 >=20 >=20 > -- > 2.32.0 (Apple Git-132) -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#117114): https://edk2.groups.io/g/devel/message/117114 Mute This Topic: https://groups.io/mt/105101991/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-