From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.93; helo=mga11.intel.com; envelope-from=chao.b.zhang@intel.com; receiver=edk2-devel@lists.01.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id CDB9020945C00 for ; Mon, 9 Oct 2017 19:43:16 -0700 (PDT) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Oct 2017 19:46:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,502,1500966000"; d="scan'208";a="160812733" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga005.fm.intel.com with ESMTP; 09 Oct 2017 19:46:43 -0700 Received: from fmsmsx124.amr.corp.intel.com (10.18.125.39) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 9 Oct 2017 19:46:43 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx124.amr.corp.intel.com (10.18.125.39) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 9 Oct 2017 19:46:43 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.175]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.213]) with mapi id 14.03.0319.002; Tue, 10 Oct 2017 10:46:38 +0800 From: "Zhang, Chao B" To: "Chen, Chen A" , "edk2-devel@lists.01.org" CC: "Bi, Dandan" Thread-Topic: [PATCH] SecurityPkg/SecureBootConfigImpl.c: Fix coding style issue. Thread-Index: AQHTQWzI4RcPR1tJ0EG1orG2PXfpW6LcYQ7A Date: Tue, 10 Oct 2017 02:46:37 +0000 Message-ID: References: <20171010020841.19452-1-chen.a.chen@intel.com> In-Reply-To: <20171010020841.19452-1-chen.a.chen@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] SecurityPkg/SecureBootConfigImpl.c: Fix coding style issue. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Oct 2017 02:43:17 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Chao Zhang -----Original Message----- From: Chen, Chen A=20 Sent: Tuesday, October 10, 2017 10:09 AM To: edk2-devel@lists.01.org Cc: Chen, Chen A ; Bi, Dandan ;= Zhang, Chao B Subject: [PATCH] SecurityPkg/SecureBootConfigImpl.c: Fix coding style issue= . Fix coding style issue. Cc: Bi Dandan Cc: Zhang Chao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: chenc2 --- .../SecureBootConfigDxe/SecureBootConfigImpl.c | 30 +++++++++++-------= ---- .../SecureBootConfigDxe/SecureBootConfigImpl.h | 14 +++++----- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBo= otConfigImpl.c b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/Secu= reBootConfigImpl.c index 457e020ece..3e5012e21b 100644 --- a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfi= gImpl.c +++ b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootCo +++ nfigImpl.c @@ -3098,11 +3098,11 @@ DeleteSignatureEx ( goto ON_EXIT; } =20 - if (PrivateData->VariableName =3D=3D VARIABLE_DB) { + if (PrivateData->VariableName =3D=3D Variable_DB) { UnicodeSPrint (VariableName, 100, EFI_IMAGE_SECURITY_DATABASE); - } else if (PrivateData->VariableName =3D=3D VARIABLE_DBX) { + } else if (PrivateData->VariableName =3D=3D Variable_DBX) { UnicodeSPrint (VariableName, 100, EFI_IMAGE_SECURITY_DATABASE1); - } else if (PrivateData->VariableName =3D=3D VARIABLE_DBT) { + } else if (PrivateData->VariableName =3D=3D Variable_DBT) { UnicodeSPrint (VariableName, 100, EFI_IMAGE_SECURITY_DATABASE2); } else { goto ON_EXIT; @@ -3149,7 +3149,7 @@ DeleteSignatureEx ( =20 RemainingSize =3D VariableDataSize; ListWalker =3D (EFI_SIGNATURE_LIST *)(VariableData); - if (DelType =3D=3D DELETE_SIGNATURE_LIST_ALL) { + if (DelType =3D=3D Delete_Signature_List_All) { VariableDataSize =3D 0; } else { while ((RemainingSize > 0) && (RemainingSize >=3D ListWalker->Signatur= eListSize) && ListIndex < PrivateData->ListIndex) { @@ -3161,7 +3161,7 @@ D= eleteSignatureEx ( ListIndex++; } =20 - if (CheckedCount =3D=3D SIGNATURE_DATA_COUNTS (ListWalker) || DelType = =3D=3D DELETE_SIGNATURE_LIST_ONE) { + if (CheckedCount =3D=3D SIGNATURE_DATA_COUNTS (ListWalker) || DelType= =20 + =3D=3D Delete_Signature_List_One) { RemainingSize -=3D ListWalker->SignatureListSize; ListWalker =3D (EFI_SIGNATURE_LIST *)((UINT8 *)ListWalker + ListWalk= er->SignatureListSize); } else { @@ -3685,13 +3685,13 @@ LoadSignatureList ( goto ON_EXIT; } =20 - if (PrivateData->VariableName =3D=3D VARIABLE_DB) { + if (PrivateData->VariableName =3D=3D Variable_DB) { UnicodeSPrint (VariableName, 100, EFI_IMAGE_SECURITY_DATABASE); DstFormId =3D FORMID_SECURE_BOOT_DB_OPTION_FORM; - } else if (PrivateData->VariableName =3D=3D VARIABLE_DBX) { + } else if (PrivateData->VariableName =3D=3D Variable_DBX) { UnicodeSPrint (VariableName, 100, EFI_IMAGE_SECURITY_DATABASE1); DstFormId =3D FORMID_SECURE_BOOT_DBX_OPTION_FORM; - } else if (PrivateData->VariableName =3D=3D VARIABLE_DBT) { + } else if (PrivateData->VariableName =3D=3D Variable_DBT) { UnicodeSPrint (VariableName, 100, EFI_IMAGE_SECURITY_DATABASE2); DstFormId =3D FORMID_SECURE_BOOT_DBT_OPTION_FORM; } else { @@ -4216,11 +4216,11 @@ LoadSignatureData ( goto ON_EXIT; } =20 - if (PrivateData->VariableName =3D=3D VARIABLE_DB) { + if (PrivateData->VariableName =3D=3D Variable_DB) { UnicodeSPrint (VariableName, 100, EFI_IMAGE_SECURITY_DATABASE); - } else if (PrivateData->VariableName =3D=3D VARIABLE_DBX) { + } else if (PrivateData->VariableName =3D=3D Variable_DBX) { UnicodeSPrint (VariableName, 100, EFI_IMAGE_SECURITY_DATABASE1); - } else if (PrivateData->VariableName =3D=3D VARIABLE_DBT) { + } else if (PrivateData->VariableName =3D=3D Variable_DBT) { UnicodeSPrint (VariableName, 100, EFI_IMAGE_SECURITY_DATABASE2); } else { goto ON_EXIT; @@ -4618,7 +4618,7 @@ SecureBootCallback ( // From DBX option to the level-1 form, display signature list. // case KEY_VALUE_FROM_DBX_TO_LIST_FORM: - Private->VariableName =3D VARIABLE_DBX; + Private->VariableName =3D Variable_DBX; LoadSignatureList ( Private, LABEL_SIGNATURE_LIST_START, @@ -4640,7 +4640,7 @@ SecureBootCallback ( ); =20 if (Key.UnicodeChar =3D=3D L'Y' || Key.UnicodeChar =3D=3D L'y') { - DeleteSignatureEx (Private, DELETE_SIGNATURE_LIST_ALL, IfrNvData->= CheckedDataCount); + DeleteSignatureEx (Private, Delete_Signature_List_All,=20 + IfrNvData->CheckedDataCount); } =20 LoadSignatureList ( @@ -4664,7 +4664,7 @@ SecureBootCallback ( ); =20 if (Key.UnicodeChar =3D=3D L'Y' || Key.UnicodeChar =3D=3D L'y') { - DeleteSignatureEx (Private, DELETE_SIGNATURE_LIST_ONE, IfrNvData->= CheckedDataCount); + DeleteSignatureEx (Private, Delete_Signature_List_One,=20 + IfrNvData->CheckedDataCount); } =20 LoadSignatureList ( @@ -4688,7 +4688,7 @@ SecureBootCallback ( ); =20 if (Key.UnicodeChar =3D=3D L'Y' || Key.UnicodeChar =3D=3D L'y') { - DeleteSignatureEx (Private, DELETE_SIGNATURE_DATA, IfrNvData->Chec= kedDataCount); + DeleteSignatureEx (Private, Delete_Signature_Data,=20 + IfrNvData->CheckedDataCount); } =20 LoadSignatureList ( diff --git a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBo= otConfigImpl.h b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/Secu= reBootConfigImpl.h index 52ad91b002..e8ae992dd2 100644 --- a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfi= gImpl.h +++ b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootCo +++ nfigImpl.h @@ -152,16 +152,16 @@ typedef struct { } HII_VENDOR_DEVICE_PATH; =20 typedef enum { - VARIABLE_DB, - VARIABLE_DBX, - VARIABLE_DBT, - VARIABLE_MAX + Variable_DB, + Variable_DBX, + Variable_DBT, + Variable_MAX } CURRENT_VARIABLE_NAME; =20 typedef enum { - DELETE_SIGNATURE_LIST_ALL, - DELETE_SIGNATURE_LIST_ONE, - DELETE_SIGNATURE_DATA + Delete_Signature_List_All, + Delete_Signature_List_One, + Delete_Signature_Data }SIGNATURE_DELETE_TYPE; =20 typedef struct { -- 2.13.2.windows.1