]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools Script: Update ConvertFceToStructurePcd to report warning messages
authorLiming Gao <liming.gao@intel.com>
Tue, 20 Nov 2018 08:05:56 +0000 (16:05 +0800)
committerLiming Gao <liming.gao@intel.com>
Thu, 29 Nov 2018 00:30:52 +0000 (08:30 +0800)
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1297
When the header files are not found for the used C structure, this script will
report the warning, let user know there is no header file to define C structure.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Wang BinX A <binx.a.wang@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
BaseTools/Scripts/ConvertFceToStructurePcd.py

index 9240b8f0f3ea4ebb613a7ac7d8373e4b3cc1fe38..59eec28d5e0010e467302accaa338d006e08c0fd 100644 (file)
@@ -416,7 +416,7 @@ class PATH(object):
 \r
   def header(self,struct):\r
     header={}\r
-    head_re = re.compile(r'} %s;[\s\S\n]+h{1}"'%struct,re.M|re.S)\r
+    head_re = re.compile('typedef.*} %s;[\n]+(.*?)(?:typedef|formset)'%struct,re.M|re.S)\r
     head_re2 = re.compile(r'#line[\s\d]+"(\S+h)"')\r
     for i in list(self.lstinf.keys()):\r
       with open(i,'r') as lst:\r