From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (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 EC02481914 for ; Tue, 27 Dec 2016 02:10:54 -0800 (PST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 27 Dec 2016 02:10:53 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,415,1477983600"; d="scan'208";a="23172011" Received: from tiano01.ccr.corp.intel.com ([10.239.9.111]) by orsmga002.jf.intel.com with ESMTP; 27 Dec 2016 02:10:53 -0800 From: hesschen To: edk2-devel@lists.01.org Cc: yonghong.zhu@intel.com, Hess Chen Date: Tue, 27 Dec 2016 18:10:48 +0800 Message-Id: <1482833448-13576-1-git-send-email-hesheng.chen@intel.com> X-Mailer: git-send-email 2.7.2.windows.1 Subject: [patch] BaseTools/Ecc X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Dec 2016 10:10:55 -0000 Fix the issue of not recognizing "FILE_GUID" Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen Signed-off-by: hesschen --- BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py b/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py index aaea1ab..ba478f9 100644 --- a/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py +++ b/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py @@ -783,6 +783,10 @@ class DscParser(MetaFileParser): "FIX_LOAD_TOP_MEMORY_ADDRESS" ] + SubSectionDefineKeywords = [ + "FILE_GUID" + ] + SymbolPattern = ValueExpression.SymbolPattern ## Constructor of DscParser @@ -993,7 +997,8 @@ class DscParser(MetaFileParser): if not self._ValueList[2]: EdkLogger.error('Parser', FORMAT_INVALID, "No value specified", ExtraData=self._CurrentLine, File=self.MetaFile, Line=self._LineIndex+1) - if not self._ValueList[1] in self.DefineKeywords: + if (not self._ValueList[1] in self.DefineKeywords and + (self._InSubsection and self._ValueList[1] not in self.SubSectionDefineKeywords)): EdkLogger.error('Parser', FORMAT_INVALID, "Unknown keyword found: %s. " "If this is a macro you must " -- 2.7.2.windows.1