From nobody Thu Mar 28 15:29:32 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; dmarc=fail(p=none dis=none) header.from=intel.com Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1533517352553534.5277322757285; Sun, 5 Aug 2018 18:02:32 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 2BAA3210DA151; Sun, 5 Aug 2018 18:02:31 -0700 (PDT) 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 94799210DA14C for ; Sun, 5 Aug 2018 18:02:29 -0700 (PDT) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Aug 2018 18:02:29 -0700 Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga001.fm.intel.com with ESMTP; 05 Aug 2018 18:02:29 -0700 Received: from fmsmsx155.amr.corp.intel.com (10.18.116.71) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 5 Aug 2018 18:02:28 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX155.amr.corp.intel.com (10.18.116.71) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 5 Aug 2018 18:02:28 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.124]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.81]) with mapi id 14.03.0319.002; Mon, 6 Aug 2018 09:02:26 +0800 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.93; helo=mga11.intel.com; envelope-from=yunhuax.feng@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,450,1526367600"; d="dat'59?scan'59,208,59";a="78733103" From: "Feng, YunhuaX" To: "edk2-devel@lists.01.org" Thread-Topic: [PATCH] BaseTools: Use gGuidPattern for Guid regular expression Thread-Index: AdQtISMtCvdjONBkQFmSMqen9v1fCQ== Date: Mon, 6 Aug 2018 01:02:25 +0000 Message-ID: <47C64442C08CCD4089DC43B6B5E46BC48AC6CA@shsmsx102.ccr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: <47C64442C08CCD4089DC43B6B5E46BC48AC6CA@shsmsx102.ccr.corp.intel.com> x-originating-ip: [10.239.127.40] MIME-Version: 1.0 X-Content-Filtered-By: Mailman/MimeDel 2.1.27 Subject: [edk2] [PATCH] BaseTools: Use gGuidPattern for Guid regular expression X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Gao, Liming" Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RDMRC_1 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Use GlobalData.py gGuidPattern for Guid regular expression Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng Reviewed-by: Yonghong Zhu =20 --- BaseTools/Source/Python/GenFds/GenFds.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/BaseTools/Source/Python/GenFds/GenFds.py b/BaseTools/Source/Py= thon/GenFds/GenFds.py index 156aae1d0e..2307a19cbe 100644 --- a/BaseTools/Source/Python/GenFds/GenFds.py +++ b/BaseTools/Source/Python/GenFds/GenFds.py @@ -42,10 +42,11 @@ from Common.Misc import GuidStructureStringToGuidString from Common.BuildVersion import gBUILD_VERSION from Common.MultipleWorkspace import MultipleWorkspace as mws from . import FfsFileStatement import glob from struct import unpack +from Common.GlobalData import gGuidPattern =20 ## Version and Copyright versionNumber =3D "1.0" + ' ' + gBUILD_VERSION __version__ =3D "%prog Version " + versionNumber __copyright__ =3D "Copyright (c) 2007 - 2018, Intel Corporation All right= s reserved." @@ -603,15 +604,11 @@ class GenFds : GuidXRefFileName =3D os.path.join(GenFdsGlobalVariable.FvDir, "Gui= d.xref") GuidXRefFile =3D BytesIO('') GuidDict =3D {} ModuleList =3D [] FileGuidList =3D [] - GuidPattern =3D re.compile("\s*([0-9a-fA-F]){8}-" - "([0-9a-fA-F]){4}-" - "([0-9a-fA-F]){4}-" - "([0-9a-fA-F]){4}-" - "([0-9a-fA-F]){12}\s*") + GuidPattern =3D gGuidPattern for Arch in ArchList: PlatformDataBase =3D BuildDb.BuildObject[GenFdsGlobalVariable.= ActivePlatform, Arch, GenFdsGlobalVariable.TargetName, GenFdsGlobalVariable= .ToolChainTag] for ModuleFile in PlatformDataBase.Modules: Module =3D BuildDb.BuildObject[ModuleFile, Arch, GenFdsGlo= balVariable.TargetName, GenFdsGlobalVariable.ToolChainTag] if Module in ModuleList: --=20 2.12.2.windows.2 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel