From 388127509abe978ab72cc379777302719cd53541 Mon Sep 17 00:00:00 2001 From: "Aaron Pop (from Dev Box)" Date: Thu, 17 Oct 2024 10:50:29 -0700 Subject: [PATCH] enable fdf parser to deal with FILE RAW = { SECTION COMPRESS { SECTION RAW statement --- edk2toollib/uefi/edk2/parsers/fdf_parser.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/edk2toollib/uefi/edk2/parsers/fdf_parser.py b/edk2toollib/uefi/edk2/parsers/fdf_parser.py index c78ea072..90075fa3 100644 --- a/edk2toollib/uefi/edk2/parsers/fdf_parser.py +++ b/edk2toollib/uefi/edk2/parsers/fdf_parser.py @@ -180,7 +180,9 @@ def ParseFile(self, filepath: str) -> None: self.FVs[section]["Files"][currentName][sectionType] = {} # TODO support guided sections # ex: SECTION UI = "GenericGopDriver" - elif sline.upper().startswith("SECTION"): # get the section + elif ( + sline.upper().startswith("SECTION") and sline.upper().count("=") > 0 + ): # get the section section_def = sline[7:].strip().split("=", 1) sectionType = section_def[0].strip() # UI in this example sectionValue = section_def[1].strip()