]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools/GenFds: Support FDF sections in any order
authorMichael Kinney <michael.d.kinney@intel.com>
Fri, 7 Oct 2016 21:07:03 +0000 (14:07 -0700)
committerMichael Kinney <michael.d.kinney@intel.com>
Wed, 12 Oct 2016 17:36:03 +0000 (10:36 -0700)
https://bugzilla.tianocore.org/show_bug.cgi?id=141

This patch updates EDK II FDF parser in GenFds to allow sections
to be placed in any order in the FDF file.

Cc: Kelly Steele <kelly.steele@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
BaseTools/Source/Python/GenFds/FdfParser.py

index 33b40c727c413e07eea114174cb28226be833a6a..5489df59a6edf8c3da9ed84d6ec78976629b9cf3 100644 (file)
@@ -1385,25 +1385,10 @@ class FdfParser:
 \r
         try:\r
             self.Preprocess()\r
-            while self.__GetFd():\r
-                pass\r
-\r
-            while self.__GetFv():\r
-                pass\r
-\r
-            while self.__GetFmp():\r
-                pass\r
-\r
-            while self.__GetCapsule():\r
-                pass\r
-\r
-            while self.__GetVtf():\r
-                pass\r
-\r
-            while self.__GetRule():\r
-                pass\r
-            \r
-            while self.__GetOptionRom():\r
+            #\r
+            # Keep processing sections of the FDF until no new sections or a syntax error is found\r
+            #\r
+            while self.__GetFd() or self.__GetFv() or self.__GetFmp() or self.__GetCapsule() or self.__GetVtf() or self.__GetRule() or self.__GetOptionRom():\r
                 pass\r
 \r
         except Warning, X:\r