Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion uefi_firmware/structs/uefi_structs.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
0x12: ("Terse executable (TE)", "te", "TE"),
0x13: ("DXE dependency expression", "dxe.depex", "DXE_DEPEX"),
# Added from previous code (not in Phoenix spec
0x14: ("Version section", "version", "VERSION"),
0x14: ("Version", "version", "VERSION"),
0x15: ("User interface name", "ui", "UI"),

0x16: ("IA-32 16-bit image", "ia32.16bit", "COMPAT16"),
Expand Down
7 changes: 5 additions & 2 deletions uefi_firmware/uefi.py
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,8 @@ def process(self):
self.parsed_object = guid_defined

elif self.type == 0x14: # version string
self.name = uefi_name(self.data)
self.build_number = struct.unpack("<H", self.data[0:2])[0]
self.name = uefi_name(self.data[2:])

elif self.type == 0x15: # user interface name
self.name = uefi_name(self.data)
Expand Down Expand Up @@ -887,7 +888,9 @@ def showinfo(self, ts='', index=-1):
_get_section_type(self.type)[0]
))
if self.type == 0x15 and self.name is not None:
print ("%sName: %s" % (ts, purple(self.name)))
print ("%s Name: %s" % (ts, purple(self.name)))
if self.type == 0x14 and self.name is not None:
print ("%s Version: %s BuildNum: %d" % (ts, self.name, self.build_number))
# DXE, PEI and SMM DEPEX sections
if self.type == 0x13 or self.type == 0x1b or self.type == 0x1c:
offset = 0
Expand Down