From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 582981A1E9B for ; Fri, 7 Oct 2016 14:33:13 -0700 (PDT) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP; 07 Oct 2016 14:33:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,456,1473145200"; d="scan'208";a="1050925894" Received: from mdkinney-mobl.amr.corp.intel.com ([10.254.78.24]) by fmsmga001.fm.intel.com with ESMTP; 07 Oct 2016 14:33:12 -0700 From: Michael Kinney To: edk2-devel@lists.01.org Cc: Kelly Steele , Yonghong Zhu , Liming Gao Date: Fri, 7 Oct 2016 14:33:05 -0700 Message-Id: <1475875986-9148-2-git-send-email-michael.d.kinney@intel.com> X-Mailer: git-send-email 2.6.3.windows.1 In-Reply-To: <1475875986-9148-1-git-send-email-michael.d.kinney@intel.com> References: <1475875986-9148-1-git-send-email-michael.d.kinney@intel.com> Subject: [Patch 1/2] BaseTools/GenFds: Support FDF sections in any order 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: Fri, 07 Oct 2016 21:33:13 -0000 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 Cc: Yonghong Zhu Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney --- BaseTools/Source/Python/GenFds/FdfParser.py | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py b/BaseTools/Source/Python/GenFds/FdfParser.py index 02ae7c9..693128c 100644 --- a/BaseTools/Source/Python/GenFds/FdfParser.py +++ b/BaseTools/Source/Python/GenFds/FdfParser.py @@ -1385,25 +1385,10 @@ class FdfParser: try: self.Preprocess() - while self.__GetFd(): - pass - - while self.__GetFv(): - pass - - while self.__GetFmp(): - pass - - while self.__GetCapsule(): - pass - - while self.__GetVtf(): - pass - - while self.__GetRule(): - pass - - while self.__GetOptionRom(): + # + # Keep processing sections of the FDF until no new sections or a syntax error is found + # + while self.__GetFd() or self.__GetFv() or self.__GetFmp() or self.__GetCapsule() or self.__GetVtf() or self.__GetRule() or self.__GetOptionRom(): pass except Warning, X: -- 2.6.3.windows.1