]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools/Ecc: Fix the issue of not recognizing "FILE_GUID"
authorHess Chen <hesheng.chen@intel.com>
Tue, 27 Dec 2016 10:10:48 +0000 (18:10 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Thu, 29 Dec 2016 02:12:51 +0000 (10:12 +0800)
Fix the issue of not recognizing "FILE_GUID"

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hess Chen <hesheng.chen@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py

index aaea1ab3fc06818507f1902bbb11a826a66cbafe..ba478f9ecf107a95628089fb54fe8bf9f8931e9d 100644 (file)
@@ -783,6 +783,10 @@ class DscParser(MetaFileParser):
         "FIX_LOAD_TOP_MEMORY_ADDRESS"\r
     ]\r
 \r
+    SubSectionDefineKeywords = [\r
+        "FILE_GUID"\r
+    ]\r
+\r
     SymbolPattern = ValueExpression.SymbolPattern\r
 \r
     ## Constructor of DscParser\r
@@ -993,7 +997,8 @@ class DscParser(MetaFileParser):
         if not self._ValueList[2]:\r
             EdkLogger.error('Parser', FORMAT_INVALID, "No value specified",\r
                             ExtraData=self._CurrentLine, File=self.MetaFile, Line=self._LineIndex+1)\r
-        if not self._ValueList[1] in self.DefineKeywords:\r
+        if (not self._ValueList[1] in self.DefineKeywords and\r
+            (self._InSubsection and self._ValueList[1] not in self.SubSectionDefineKeywords)):\r
             EdkLogger.error('Parser', FORMAT_INVALID,\r
                             "Unknown keyword found: %s. "\r
                             "If this is a macro you must "\r