Enhance Trim tool to handle framework FV header.
authorlgao4 <lgao4@c2973edb-eda0-4c78-bc6a-9341b269661f>
Tue, 26 Jan 2010 08:16:15 +0000 (08:16 +0000)
committerlgao4 <lgao4@c2973edb-eda0-4c78-bc6a-9341b269661f>
Tue, 26 Jan 2010 08:16:15 +0000 (08:16 +0000)
git-svn-id: https://edk2-buildtools.svn.sourceforge.net/svnroot/edk2-buildtools/trunk/BaseTools@1817 c2973edb-eda0-4c78-bc6a-9341b269661f

Source/Python/Trim/Trim.py

index a55c136..209b663 100644 (file)
@@ -81,6 +81,21 @@ gImportCodePatterns = [
         '#include <FvLoadFile.h>'
     ],
 
+    [
+        re.compile('#include\s+EFI_GUID_DEFINITION\s*\(FirmwareFileSystem\)', re.MULTILINE),
+        '#include EFI_GUID_DEFINITION (FirmwareFileSystem)\n#include EFI_GUID_DEFINITION (FirmwareFileSystem2)'
+    ],
+
+    [
+        re.compile('gEfiFirmwareFileSystemGuid', re.MULTILINE),
+        'gEfiFirmwareFileSystem2Guid'
+    ],
+
+    [
+        re.compile('EFI_FVH_REVISION', re.MULTILINE),
+        'EFI_FVH_PI_REVISION'
+    ],
+
     [
         re.compile("(\s*)\S*CreateEvent\s*\([\s\n]*EFI_EVENT_SIGNAL_READY_TO_BOOT[^,]*,((?:[^;]+\n)+)(\s*\));", re.MULTILINE),
         '\\1EfiCreateEventReadyToBoot (\\2\\3;'