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 226F994154E for ; Thu, 4 Apr 2024 10:18:30 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=Adcdi8gG3zZ3LnJbrCdWCNdU5qgQvQInfzvW+XmrPww=; c=relaxed/simple; d=groups.io; h=Received-SPF: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:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding:Content-Type; s=20240206; t=1712225909; v=1; b=1xfgbfSpE9/ZV+o3PNoIgESk4l5koVnc5VwfUAV6nquUddzCUrVC97dTMgsx+qQTomJXKuzk ECvqyGZstbpdzQAJ97ANvAHtEW0qgVyAv3fR1exK7ymlro1ZcasdeuPSMe2fRjKDPYrHIrt/dgS cJxLlutf/56fX1Tr3ApHvlMHL+ScVg/iIKZ+aMYSxzAakqqPtMbhjInhtYG4TZI9ykj/xLQ9kEX hQwiO1oj5U0tg2/Abjjn+SMyryKoQiw6N7grxGwOqXcSDCpE50SGrmQVwqr6fBfJmCy042CWw0w NkMOaiAgT9jDldAMlQNxzlDtPX4Ea/oGMCUUa98NSg9aw== X-Received: by 127.0.0.2 with SMTP id uavnYY7687511xoAjp2CfDU2; Thu, 04 Apr 2024 03:18:29 -0700 X-Received: from NAM11-BN8-obe.outbound.protection.outlook.com (NAM11-BN8-obe.outbound.protection.outlook.com [40.107.236.41]) by mx.groups.io with SMTP id smtpd.web10.34723.1712225909194228160 for ; Thu, 04 Apr 2024 03:18:29 -0700 X-Received: from BY3PR10CA0011.namprd10.prod.outlook.com (2603:10b6:a03:255::16) by IA1PR12MB6355.namprd12.prod.outlook.com (2603:10b6:208:3e1::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.28; Thu, 4 Apr 2024 10:18:26 +0000 X-Received: from CO1PEPF000066ED.namprd05.prod.outlook.com (2603:10b6:a03:255:cafe::60) by BY3PR10CA0011.outlook.office365.com (2603:10b6:a03:255::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.46 via Frontend Transport; Thu, 4 Apr 2024 10:18:26 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C X-Received: from SATLEXMB04.amd.com (165.204.84.17) by CO1PEPF000066ED.mail.protection.outlook.com (10.167.249.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7452.22 via Frontend Transport; Thu, 4 Apr 2024 10:18:25 +0000 X-Received: from TPE-L1-ABNCHANG.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Thu, 4 Apr 2024 05:18:22 -0500 From: "Chang, Abner via groups.io" To: CC: Nickle Wang , Igor Kulchytskyy Subject: [edk2-devel] [PATCH V3 4/6] RedfishPkg/RedfishPlatformConfigDxe: HII string is deleted unexpectedly Date: Thu, 4 Apr 2024 18:17:56 +0800 Message-ID: <20240404101758.84-5-abner.chang@amd.com> In-Reply-To: <20240404101758.84-1-abner.chang@amd.com> References: <20240404101758.84-1-abner.chang@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF000066ED:EE_|IA1PR12MB6355:EE_ X-MS-Office365-Filtering-Correlation-Id: a4505bc1-433c-4550-fc1e-08dc549090e3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: s3f7JiHSh1sdyoPD8gZcfObv3ZmREVpBLEoggsaEcmvRROjmfblhMgdXivxjbjuBYrci1yGyh0bW/ijxyaeHabcmNM/c1uSuxIH2bOez8YDIY/q3j8F4MHkH9i5sJkdl2jX9uW0iftmrr6rX7eR48VptYKfMaUZrPSvZI0vJKErUc+y7ECXr8d288wHN26Dw/nqetJ+4sC6zKiG+vWmKn07tIbHhx4GnmXU1vprDcHOqYGYB6sL5VB/oN5rV/PEv2iFpii+uZI2Aq20ea2gK1r9ixYr5XH93iM3PN2NTv1FeTfU+f0PBgZF6lJ7RSKiHi4qNJVkkPInEg+tCldwy4SiDXptP5mXSBmC2BvlYeH30b7A/6wRRu2XIfQwMPWACxP1GONXxox1qNEJJLbKnSIruy0dh4133I3/Rds7qmqKML3OjyrNRg/VM67X7B3rs1a4y6lM01vQ8SYUUAw6pZ3n9S3Dj1/kbKbMLpm4oQT2GE/api+UbtaURj0nKLEGc46MbB7Tm3Pbz2saqUNf7S04weSIqC9FhsWcatQ7kn8csk7Iz6ERf6w40trYuYtbnzrfUJ2SZ6VVx2N1ozU+jvZ+tx8WcFd41VZNuVCNAzz1EN2ztzwgWe0O/cJVNjm1q8VuCVqG2GQQsDOGKePiW85gL/wX/xoe/oKURIIsCoSqak4gChNMzebI7iv9bv/plI8NAuyUtDNeKFBqMq9bHKQvXCkaP+z8tlj09tyjjJTYR2yleYB5oMMseAwUSPjSF X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Apr 2024 10:18:25.9214 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a4505bc1-433c-4550-fc1e-08dc549090e3 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1PEPF000066ED.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB6355 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: Thu, 04 Apr 2024 03:18:29 -0700 Resent-From: abner.chang@amd.com Reply-To: devel@edk2.groups.io,abner.chang@amd.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: hlxjgXdnfnpRSWk4lUdyDGLYx7686176AA= Content-Transfer-Encoding: quoted-printable Content-Type: text/plain X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=1xfgbfSp; 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 From: Abner Chang Add the condition check when delete HII string. Only when the HiiStatement operand equal to "EFI_IFR_STRING_OP" and the statement value type =3D EFI_IFR_TYPE_STRING. Signed-off-by: Abner Chang Co-authored-by: Nickle Wang Cc: Igor Kulchytskyy Reviewed-by: Nickle Wang --- .../RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.c= b/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.c index 99e7827eeaf..86f5d3c4478 100644 --- a/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.c +++ b/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.c @@ -1873,8 +1873,11 @@ RedfishPlatformConfigSetStatementCommon ( DEBUG ((DEBUG_ERROR, "%a: failed to save question value: %r\n", __func= __, Status)); } =20 - if (StatementValue->Value.string !=3D 0) { - HiiDeleteString (StatementValue->Value.string, TargetStatement->Parent= Form->ParentFormset->HiiHandle); + if ((TargetStatement->HiiStatement->Operand =3D=3D EFI_IFR_STRING_OP) &&= (StatementValue->Type =3D=3D EFI_IFR_TYPE_STRING)) { + if (StatementValue->Value.string !=3D 0) { + // Delete HII string which was created for HII statement operand =3D= EFI_IFR_STRING_OP and Type =3D EFI_IFR_TYPE_STRING. + HiiDeleteString (StatementValue->Value.string, TargetStatement->Pare= ntForm->ParentFormset->HiiHandle); + } } =20 return Status; --=20 2.37.1.windows.1 -=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 (#117427): https://edk2.groups.io/g/devel/message/117427 Mute This Topic: https://groups.io/mt/105326107/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-