From nobody Fri May 3 17:52:03 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1507601326666943.7941402233579; Mon, 9 Oct 2017 19:08:46 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id E616D2095B08C; Mon, 9 Oct 2017 19:05:17 -0700 (PDT) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (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 B8C2A20945BD7 for ; Mon, 9 Oct 2017 19:05:16 -0700 (PDT) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Oct 2017 19:08:43 -0700 Received: from chenche4.ccr.corp.intel.com ([10.239.158.36]) by fmsmga004.fm.intel.com with ESMTP; 09 Oct 2017 19:08:42 -0700 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.115; helo=mga14.intel.com; envelope-from=chen.a.chen@intel.com; receiver=edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,502,1500966000"; d="scan'208";a="321392524" From: chenc2 To: edk2-devel@lists.01.org Date: Tue, 10 Oct 2017 10:08:41 +0800 Message-Id: <20171010020841.19452-1-chen.a.chen@intel.com> X-Mailer: git-send-email 2.13.2.windows.1 Subject: [edk2] [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: , Cc: Bi Dandan , Zhang Chao MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Fix coding style issue. Cc: Bi Dandan Cc: Zhang Chao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: chenc2 Reviewed-by: Bi Dandan Reviewed-by: Chao Zhang --- .../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/SecureBootConfi= gImpl.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 @@ DeleteSignatureEx ( 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 = =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, 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, 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, IfrNvData->Chec= kedDataCount); } =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/SecureBootConfi= gImpl.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 { --=20 2.13.2.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel