mirror of
https://github.com/LongSoft/UEFITool.git
synced 2025-05-13 14:44:47 -04:00
UEFIPatch 0.1.0
- new command-line utility to patch files inside UEFI image - corrected bug with wrong header size calculation for GUID_DEFINED_SECTION with PROCESSING_REQUIRED attribute set - patch routine implemented in ffsEngine, will be added to UEFITool soon
This commit is contained in:
parent
02a240ba18
commit
1c34c1bf84
10 changed files with 408 additions and 11 deletions
13
ffs.cpp
13
ffs.cpp
|
@ -165,14 +165,19 @@ QString sectionTypeToQString(const UINT8 type)
|
|||
}
|
||||
}
|
||||
|
||||
UINT32 sizeOfSectionHeaderOfType(const UINT8 type)
|
||||
UINT32 sizeOfSectionHeader(EFI_COMMON_SECTION_HEADER* header)
|
||||
{
|
||||
switch (type)
|
||||
if (!header)
|
||||
return 0;
|
||||
|
||||
switch (header->Type)
|
||||
{
|
||||
case EFI_SECTION_COMPRESSION:
|
||||
return sizeof(EFI_COMMON_SECTION_HEADER);
|
||||
case EFI_SECTION_GUID_DEFINED:
|
||||
return sizeof(EFI_GUID_DEFINED_SECTION);
|
||||
case EFI_SECTION_GUID_DEFINED: {
|
||||
EFI_GUID_DEFINED_SECTION* gdsHeader = (EFI_GUID_DEFINED_SECTION*)header;
|
||||
return gdsHeader->DataOffset;
|
||||
}
|
||||
case EFI_SECTION_DISPOSABLE:
|
||||
return sizeof(EFI_DISPOSABLE_SECTION);
|
||||
case EFI_SECTION_PE32:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue