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 C4D6DAC1199 for ; Thu, 3 Aug 2023 13:27:26 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=QSa+nRovaEQ+Zd2QrOehBcqN+akSFTskBqAy2R4KBb8=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results: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:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1691069245; v=1; b=wzfhr25W5bbzlDRHesVvzH+Es/84frhzh3kQ7DYJfIXR5XtyaYEjmWZl27q2PZrUOT/e3HZe VX0FwT1ZS3bnRunm0MtoNE6udTxUAtUF6loCPiJh/cGiaQzjO/enl1maAGpYYKLyogQCwjjoYS4 bisL9cISSZqbbOeBjVy6YvtI= X-Received: by 127.0.0.2 with SMTP id qjEwYY7687511xakP9nf0oyZ; Thu, 03 Aug 2023 06:27:25 -0700 X-Received: from NAM11-CO1-obe.outbound.protection.outlook.com (NAM11-CO1-obe.outbound.protection.outlook.com [40.107.220.49]) by mx.groups.io with SMTP id smtpd.web10.14632.1691069244471197081 for ; Thu, 03 Aug 2023 06:27:24 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TrDlpyxztQRYtqSA/29Pk2tXQ+jdnrLNZjWDb8fq0NwPpiYGyOI5XCNKaTl+9RAEM8F25aoIACfr/S+0blOCyvvcc0MskdR2xDPQqb7WcWpFG3vXnvPWmNJzY6U8C/TSaD+vrvo5dif77uonmQLsb7UN/UEFVIGFbcLPmMDSNDnWYCnUbeIzpH+wu2OuE2SZBDt4hEX/MIJ16Sh5XbkW6MJlybnO4GjTBmDowKdPIbMbvoWeYsPd/HfVQbFBeeR7G5kMBnAOuyuA39t/gCLeSAP1iDdu7bjI0LFQg0O86oZtA+Gog3M8ZfsIle4vvTslk4pFaUyJBLwO2chb+UOldw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=i66rN3E7Ef292LH65hBzJHVRCZZUUMh1cNieL+URItY=; b=k26yejpns4RT6KFuJrrEGM/LghQhd0UwjEVk/uGUMTz7rO7QT+x/t5D/pJ7ga/+YH/tHe+pecsXdYrd4ZhIl2uIbQJiO7k5GiSrHgeB8gGthcMILqSVWIAui2s3SOgxcGSMI+9gzrPtAJxwWzQaExB613MojvCORY+NRwnzqUYyWVCn4F4MD4t4jkG7NP0gevoEBqSt3V8VwJNurZy53lIlMSD945z1sjR+oEqpOWYvxyGZUHnOXmkC0JH//92JdkA9PhOhB2hV0ljVvhaIiA1swGuguuDgZhZ1RXvMbmPAfkR5Acl8jQOfJHTH92/TuaAeFy6h6nbQHZQ82KQH0cw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ami.com; dmarc=pass action=none header.from=ami.com; dkim=pass header.d=ami.com; arc=none X-Received: from BLAPR10MB5185.namprd10.prod.outlook.com (2603:10b6:208:328::16) by DM4PR10MB6789.namprd10.prod.outlook.com (2603:10b6:8:10b::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.47; Thu, 3 Aug 2023 13:27:20 +0000 X-Received: from BLAPR10MB5185.namprd10.prod.outlook.com ([fe80::54b4:fe44:b9d9:ab6d]) by BLAPR10MB5185.namprd10.prod.outlook.com ([fe80::54b4:fe44:b9d9:ab6d%4]) with mapi id 15.20.6652.020; Thu, 3 Aug 2023 13:27:20 +0000 From: "Igor Kulchytskyy via groups.io" To: Nickle Wang , "devel@edk2.groups.io" CC: Abner Chang , Nick Ramirez Subject: Re: [edk2-devel] [PATCH] RedfishPkg/RedfishPlatformConfigDxe: fix can not set one-of option issue. Thread-Topic: [EXTERNAL] [PATCH] RedfishPkg/RedfishPlatformConfigDxe: fix can not set one-of option issue. Thread-Index: AQHZvHUapqG9/YfwuUqIspyvEWT8ga/IJ4oggA/96NCAAH4IEA== Date: Thu, 3 Aug 2023 13:27:19 +0000 Message-ID: References: <20230722081816.212-1-nicklew@nvidia.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: BLAPR10MB5185:EE_|DM4PR10MB6789:EE_ x-ms-office365-filtering-correlation-id: e1b06113-d9d7-44cc-f42f-08db94255d19 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: CqF6jD2S1G0hRSFCBCagljbpLX0BhBFE3aPJ+dIWZPbCm27bJlFSvP1tGAiVQZ11Xb1ddEAf24wXmUye7q2vjf2reK3+P7MW9m0hasxXUvhcgg46cIg+NBWErjcuCJmHXwFAIuKHoijdYeZlNvT4BQ79GR+OCRyAuh+cRvzqGfTpYzQUXCRzu5U/IcY4WbI1HoTy5vQsMRNjd2+LaVxHU9UEziwrdai85KhnuRCsUlgE9Avbqz55DXC2FdwcvigAwoBYbKXOx3MkRuXysUWp2tnyRWM3bdreJuT62172EjIQ33a4oK1M09KDA+Okkcxb5dEJcJxK5Dban/pvNybAjNRsKUIJI5FpKwW4dNtkz1b9JhXW9EkTRUf9ZXa7Bk3OP9JKLHk1U5UIMKgqMFNrJ4WTaoXhQigupl4aITbGYbLcLEw0Jg7zKjRNVT2RAz64wGIG3U+9eBoH/BZUhYHnB3OlwBn6YJqo+/pbuYQSJsDa1ILj3/rj7FUyIzw96fZkUqVO/RlJ1KpyBqe2m1Z1XImZ3BjgDBF6V5QQDjDmT71vvGku8KWnMAuA8sNNw0EjiRoWQIp1i0QIQPmfXeN55wUndc9N9erPR4K9TWrJ0TOVca8Z0hdhYcMOjDJ5K0tW x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?mz3mX8HnJtfCmU15xjJnh7B+iy7DPtHaSMZKm9zLSq1DG45gq3B8W1KUom7r?= =?us-ascii?Q?iFplXi5cCDoV8IbWMX0JtpRXgkZCy9Wgkx86OlMnaYdvtP5FWdXFnY6V3yab?= =?us-ascii?Q?YvgCsITJMv2/kHRgmVCYWnObDggRPTL6H3cIM1Tbw84c/iiapFxyjORhgXBd?= =?us-ascii?Q?A0/5V07BCwg/4AhiYO43GrorYdp1kX6p5mMYTd7Z04h4K5MQMaCoO/KKhZyP?= =?us-ascii?Q?f7w+gSjj7FCM1ajFk4D6YOaBFwBs2wMJZJBRDLFHeSFjKxamIHFbLtsTp2Hs?= =?us-ascii?Q?+7d8+3rSnVLfg8kUCOBWD02d2J36ac+kzmjk4tC168DTrArR713m40IB90HR?= =?us-ascii?Q?B0jsKDJQoJmqwTi9SgxxC8FyD7tDJfBvwKhaGrjjAPdQ5Ukqakssn5PPcllX?= =?us-ascii?Q?6iPqZMrhLO8XVdXJ/G8KNq9cJSbWWxuMnbRC+eyAx5J0Nfpoqdc22R6NWk3e?= =?us-ascii?Q?ZQ/wQ1WCrAl1noJTd3FCouI/c75psb32zzbt+Q2Z70XBdfP6WtbWCWFnOHpt?= =?us-ascii?Q?z4xBwKyRkXjyC6Q+N1H4++ZBCH4iv7eADl2N6n3jRNHsPT6a3iluRlwnXw+t?= =?us-ascii?Q?1RiCj4BVdb2VytNfsDLbIcinN+h9aPuGlFT1ibmhbevxtiYb2GYAybEPq/HU?= =?us-ascii?Q?99+D0/2v+kCkn9J98kvwQAAw6wpGYM1xvoVL4JbZLVZow4IiWZxTyBe/iShn?= =?us-ascii?Q?L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ami.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BLAPR10MB5185.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e1b06113-d9d7-44cc-f42f-08db94255d19 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Aug 2023 13:27:19.9504 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 27e97857-e15f-486c-b58e-86c2b3040f93 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 9j/CwnY+x9I5YWOcgdaKpqI2Pzh01xzfxeoJ/myyChUEGv0Oeudo5w9hKJpOHtsE X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR10MB6789 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 Reply-To: devel@edk2.groups.io,igork@ami.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: 4GaT1S85pSxtWcds3crkACL9x7686176AA= 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=20140610 header.b=wzfhr25W; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}"); dmarc=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 Thank you, Nickle. -----Original Message----- From: Nickle Wang Sent: Thursday, August 03, 2023 2:00 AM To: Igor Kulchytskyy ; devel@edk2.groups.io Cc: Abner Chang ; Nick Ramirez Subject: RE: [EXTERNAL] [PATCH] RedfishPkg/RedfishPlatformConfigDxe: fix ca= n not set one-of option issue. Hi Igor, Thanks for your review. I think this is feasible. Let me try it and provide= version 2 patch. Thanks, Nickle > -----Original Message----- > From: Igor Kulchytskyy > Sent: Monday, July 24, 2023 9:49 AM > To: Nickle Wang ; devel@edk2.groups.io > Cc: Abner Chang ; Nick Ramirez > > Subject: RE: [EXTERNAL] [PATCH] RedfishPkg/RedfishPlatformConfigDxe: fix = can > not set one-of option issue. > > External email: Use caution opening links or attachments > > > Hi Nickle, > May I ask you a question. What is the point to allocate and copy buffer. = Then > delete the original buffer. > Could we just assign StatementValue->Buffer to TempBuffer and then assign > NULL to StatementValue->Buffer? > > TempBuffer =3D StatementValue->Buffer; > StatementValue->Buffer =3D NULL; > > Result would be the same, but we do not need to allocate and free memory. > Or I do not understand something? > Thank you, > Igor > > -----Original Message----- > From: Nickle Wang > Sent: Saturday, July 22, 2023 4:18 AM > To: devel@edk2.groups.io > Cc: Abner Chang ; Igor Kulchytskyy ; > Nick Ramirez > Subject: [EXTERNAL] [PATCH] RedfishPkg/RedfishPlatformConfigDxe: fix can = not > set one-of option issue. > > > **CAUTION: The e-mail below is from an external source. Please exercise > caution before opening attachments, clicking links, or following guidance= .** > > StatementValue->Buffer is converted from ASCII to Unicode by caller > already so we don't have to convert it again. > > Signed-off-by: Nickle Wang > Cc: Abner Chang > Cc: Igor Kulchytskyy > Cc: Nick Ramirez > --- > .../RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigDxe= .c > b/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.c > index f2a8e77d9b00..648f3d2de7aa 100644 > --- a/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.c > +++ b/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.c > @@ -1660,7 +1660,11 @@ RedfishPlatformConfigSetStatementCommon ( > // in string format from HII point of view. Do a patch here. > // > if ((TargetStatement->HiiStatement->Operand =3D=3D EFI_IFR_ONE_OF_OP= ) && > (StatementValue->Type =3D=3D EFI_IFR_TYPE_STRING)) { > - TempBuffer =3D StrToUnicodeStr ((CHAR8 *)StatementValue->Buffer); > + // > + // Make a copy of input buffer to TempBuffer because StatementValu= e will be > + // assigned in HiiStringToOneOfOptionValue(). > + // > + TempBuffer =3D AllocateCopyPool (StrSize ((EFI_STRING)StatementVal= ue- > >Buffer), StatementValue->Buffer); > if (TempBuffer =3D=3D NULL) { > return EFI_OUT_OF_RESOURCES; > } > -- > 2.17.1 > > -The information contained in this message may be confidential and propri= etary > to American Megatrends (AMI). This communication is intended to be read o= nly by > the individual or entity to whom it is addressed or by their designee. If= the reader > of this message is not the intended recipient, you are on notice that any > distribution of this message, in any form, is strictly prohibited. Please= promptly > notify the sender by reply e-mail or by telephone at 770-246-8600, and th= en > delete or destroy all copies of the transmission. -The information contained in this message may be confidential and propriet= ary to American Megatrends (AMI). This communication is intended to be read= only by the individual or entity to whom it is addressed or by their desig= nee. If the reader of this message is not the intended recipient, you are o= n notice that any distribution of this message, in any form, is strictly pr= ohibited. Please promptly notify the sender by reply e-mail or by telephone= at 770-246-8600, and then delete or destroy all copies of the transmission= . -=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 (#107540): https://edk2.groups.io/g/devel/message/107540 Mute This Topic: https://groups.io/mt/100292370/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-