Skip to content

Commit

Permalink
enable fdf parser to deal with FILE RAW = <guid> { SECTION COMPRESS {…
Browse files Browse the repository at this point in the history
… SECTION RAW statement
  • Loading branch information
apop5 committed Oct 17, 2024
1 parent 954f914 commit 3881275
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion edk2toollib/uefi/edk2/parsers/fdf_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 3881275

Please sign in to comment.