mirror of
https://github.com/LongSoft/UEFITool.git
synced 2025-05-16 16:14:47 -04:00
Revert "Update hexadecimal numbers output format from ABCDh to 0xABCD" due to breaking downstream tools
This reverts commit 9cc9518f8b
.
This commit is contained in:
parent
775227942a
commit
a19aeadb54
10 changed files with 397 additions and 399 deletions
|
@ -136,8 +136,8 @@ USTATUS MeParser::parseFptRegion(const UByteArray & region, const UModelIndex &
|
|||
if (ptHeader->HeaderVersion == FPT_HEADER_VERSION_21) {
|
||||
const FPT_HEADER_21* ptHeader21 = (const FPT_HEADER_21*)ptHeader;
|
||||
|
||||
info = usprintf("Full size: 0x%X (%u)\nHeader size: 0x%X (%u)\nBody size: 0x%X (%u)\nROM bypass vector: %s\nNumber of entries: %u\nHeader version: 0x%02X\nEntry version: 0x%02X\n"
|
||||
"Header length: 0x%02X\nFlags: 0x%X\nTicks to add: 0x%04X\nTokens to add: 0x%04X\nSPS Flags: 0x%X\nFITC version: %u.%u.%u.%u\nCRC32 Checksum: 0x%08X",
|
||||
info = usprintf("Full size: %Xh (%u)\nHeader size: %Xh (%u)\nBody size: %Xh (%u)\nROM bypass vector: %s\nNumber of entries: %u\nHeader version: %02Xh\nEntry version: %02Xh\n"
|
||||
"Header length: %02Xh\nFlags: %Xh\nTicks to add: %04Xh\nTokens to add: %04Xh\nSPS Flags: %Xh\nFITC version: %u.%u.%u.%u\nCRC32 Checksum: %08Xh",
|
||||
ptSize, ptSize,
|
||||
(UINT32)header.size(), (UINT32)header.size(),
|
||||
ptBodySize, ptBodySize,
|
||||
|
@ -156,8 +156,8 @@ USTATUS MeParser::parseFptRegion(const UByteArray & region, const UModelIndex &
|
|||
}
|
||||
// Default handling for all other versions, may be too generic in some corner cases
|
||||
else {
|
||||
info = usprintf("Full size: 0x%X (%u)\nHeader size: 0x%X (%u)\nBody size: 0x%X (%u)\nROM bypass vector: %s\nNumber of entries: %u\nHeader version: 0x%02X\nEntry version: 0x%02X\n"
|
||||
"Header length: 0x%02X\nFlash cycle life: 0x%04X\nFlash cycle limit: 0x%04X\nUMA size: 0x%X\nFlags: 0x%X\nFITC version: %u.%u.%u.%u\nChecksum: 0x%02X",
|
||||
info = usprintf("Full size: %Xh (%u)\nHeader size: %Xh (%u)\nBody size: %Xh (%u)\nROM bypass vector: %s\nNumber of entries: %u\nHeader version: %02Xh\nEntry version: %02Xh\n"
|
||||
"Header length: %02Xh\nFlash cycle life: %04Xh\nFlash cycle limit: %04Xh\nUMA size: %Xh\nFlags: %Xh\nFITC version: %u.%u.%u.%u\nChecksum: %02Xh",
|
||||
ptSize, ptSize,
|
||||
(UINT32)header.size(), (UINT32)header.size(),
|
||||
ptBodySize, ptBodySize,
|
||||
|
@ -189,7 +189,7 @@ USTATUS MeParser::parseFptRegion(const UByteArray & region, const UModelIndex &
|
|||
|
||||
// Get info
|
||||
name = visibleAsciiOrHex((UINT8*)ptEntry->Name, 4);
|
||||
info = usprintf("Full size: 0x%X (%u)\nPartition offset: 0x%X\nPartition length: 0x%X\nPartition type: 0x%02X",
|
||||
info = usprintf("Full size: %Xh (%u)\nPartition offset: %Xh\nPartition length: %Xh\nPartition type: %02Xh",
|
||||
(UINT32)sizeof(FPT_HEADER_ENTRY), (UINT32)sizeof(FPT_HEADER_ENTRY),
|
||||
ptEntry->Offset,
|
||||
ptEntry->Size,
|
||||
|
@ -305,7 +305,7 @@ make_partition_table_consistent:
|
|||
UModelIndex partitionIndex;
|
||||
// Get info
|
||||
name = visibleAsciiOrHex((UINT8*) partitions[i].ptEntry.Name, 4);
|
||||
info = usprintf("Full size: 0x%X (%u)\nPartition type: 0x%02X\n",
|
||||
info = usprintf("Full size: %Xh (%u)\nPartition type: %02Xh\n",
|
||||
(UINT32)partition.size(), (UINT32)partition.size(),
|
||||
partitions[i].ptEntry.Type);
|
||||
|
||||
|
@ -321,7 +321,7 @@ make_partition_table_consistent:
|
|||
else if (partitions[i].type == Types::Padding) {
|
||||
// Get info
|
||||
name = UString("Padding");
|
||||
info = usprintf("Full size: 0x%X (%u)", (UINT32)partition.size(), (UINT32)partition.size());
|
||||
info = usprintf("Full size: %Xh (%u)", (UINT32)partition.size(), (UINT32)partition.size());
|
||||
|
||||
// Add tree item
|
||||
model->addItem(partitions[i].ptEntry.Offset, Types::Padding, getPaddingType(partition), name, UString(), info, UByteArray(), partition, UByteArray(), Fixed, parent);
|
||||
|
@ -346,14 +346,14 @@ USTATUS MeParser::parseIfwi16Region(const UByteArray & region, const UModelIndex
|
|||
UByteArray header = region.left(ptSize);
|
||||
|
||||
UString name = UString("IFWI 1.6 header");
|
||||
UString info = usprintf("Full size: 0x%X (%u)\n"
|
||||
"Data partition offset: 0x%X\nData partition size: 0x%X\n"
|
||||
"Boot1 partition offset: 0x%X\nBoot1 partition size: 0x%X\n"
|
||||
"Boot2 partition offset: 0x%X\nBoot2 partition size: 0x%X\n"
|
||||
"Boot3 partition offset: 0x%X\nBoot3 partition size: 0x%X\n"
|
||||
"Boot4 partition offset: 0x%X\nBoot4 partition size: 0x%X\n"
|
||||
"Boot5 partition offset: 0x%X\nBoot5 partition size: 0x%X\n"
|
||||
"Checksum: 0x%" PRIX64,
|
||||
UString info = usprintf("Full size: %Xh (%u)\n"
|
||||
"Data partition offset: %Xh\nData partition size: %Xh\n"
|
||||
"Boot1 partition offset: %Xh\nBoot1 partition size: %Xh\n"
|
||||
"Boot2 partition offset: %Xh\nBoot2 partition size: %Xh\n"
|
||||
"Boot3 partition offset: %Xh\nBoot3 partition size: %Xh\n"
|
||||
"Boot4 partition offset: %Xh\nBoot4 partition size: %Xh\n"
|
||||
"Boot5 partition offset: %Xh\nBoot5 partition size: %Xh\n"
|
||||
"Checksum: %" PRIX64 "h",
|
||||
(UINT32)header.size(), (UINT32)header.size(),
|
||||
ifwiHeader->DataPartition.Offset, ifwiHeader->DataPartition.Size,
|
||||
ifwiHeader->BootPartition[0].Offset, ifwiHeader->BootPartition[0].Size,
|
||||
|
@ -471,7 +471,7 @@ make_partition_table_consistent:
|
|||
}
|
||||
|
||||
// Get info
|
||||
info = usprintf("Full size: 0x%X (%u)\n", (UINT32)partition.size(), (UINT32)partition.size());
|
||||
info = usprintf("Full size: %Xh (%u)\n", (UINT32)partition.size(), (UINT32)partition.size());
|
||||
|
||||
// Add tree item
|
||||
partitionIndex = model->addItem(partitions[i].ptEntry.Offset, partitions[i].type, partitions[i].subtype, name, UString(), info, UByteArray(), partition, UByteArray(), Fixed, parent);
|
||||
|
@ -490,7 +490,7 @@ make_partition_table_consistent:
|
|||
else if (partitions[i].type == Types::Padding) {
|
||||
// Get info
|
||||
name = UString("Padding");
|
||||
info = usprintf("Full size: 0x%X (%u)", (UINT32)partition.size(), (UINT32)partition.size());
|
||||
info = usprintf("Full size: %Xh (%u)", (UINT32)partition.size(), (UINT32)partition.size());
|
||||
|
||||
// Add tree item
|
||||
model->addItem(partitions[i].ptEntry.Offset, Types::Padding, getPaddingType(partition), name, UString(), info, UByteArray(), partition, UByteArray(), Fixed, parent);
|
||||
|
@ -516,17 +516,17 @@ USTATUS MeParser::parseIfwi17Region(const UByteArray & region, const UModelIndex
|
|||
UByteArray header = region.left(ptSize);
|
||||
|
||||
UString name = UString("IFWI 1.7 header");
|
||||
UString info = usprintf("Full size: 0x%X (%u)\n"
|
||||
"Flags: 0x%02X\n"
|
||||
"Reserved: 0x%02X\n"
|
||||
"Checksum: 0x%X\n"
|
||||
"Data partition offset: 0x%X\nData partition size: 0x%X\n"
|
||||
"Boot1 partition offset: 0x%X\nBoot1 partition size: 0x%X\n"
|
||||
"Boot2 partition offset: 0x%X\nBoot2 partition size: 0x%X\n"
|
||||
"Boot3 partition offset: 0x%X\nBoot3 partition size: 0x%X\n"
|
||||
"Boot4 partition offset: 0x%X\nBoot4 partition size: 0x%X\n"
|
||||
"Boot5 partition offset: 0x%X\nBoot5 partition size: 0x%X\n"
|
||||
"Temp page offset: 0x%X\nTemp page size: 0x%X\n",
|
||||
UString info = usprintf("Full size: %Xh (%u)\n"
|
||||
"Flags: %02Xh\n"
|
||||
"Reserved: %02Xh\n"
|
||||
"Checksum: %Xh\n"
|
||||
"Data partition offset: %Xh\nData partition size: %Xh\n"
|
||||
"Boot1 partition offset: %Xh\nBoot1 partition size: %Xh\n"
|
||||
"Boot2 partition offset: %Xh\nBoot2 partition size: %Xh\n"
|
||||
"Boot3 partition offset: %Xh\nBoot3 partition size: %Xh\n"
|
||||
"Boot4 partition offset: %Xh\nBoot4 partition size: %Xh\n"
|
||||
"Boot5 partition offset: %Xh\nBoot5 partition size: %Xh\n"
|
||||
"Temp page offset: %Xh\nTemp page size: %Xh\n",
|
||||
(UINT32)header.size(), (UINT32)header.size(),
|
||||
ifwiHeader->Flags,
|
||||
ifwiHeader->Reserved,
|
||||
|
@ -659,7 +659,7 @@ make_partition_table_consistent:
|
|||
}
|
||||
|
||||
// Get info
|
||||
info = usprintf("Full size: 0x%X (%u)\n", (UINT32)partition.size(), (UINT32)partition.size());
|
||||
info = usprintf("Full size: %Xh (%u)\n", (UINT32)partition.size(), (UINT32)partition.size());
|
||||
|
||||
// Add tree item
|
||||
partitionIndex = model->addItem(partitions[i].ptEntry.Offset, partitions[i].type, partitions[i].subtype, name, UString(), info, UByteArray(), partition, UByteArray(), Fixed, parent);
|
||||
|
@ -685,7 +685,7 @@ make_partition_table_consistent:
|
|||
else if (partitions[i].type == Types::Padding) {
|
||||
// Get info
|
||||
name = UString("Padding");
|
||||
info = usprintf("Full size: 0x%X (%u)", (UINT32)partition.size(), (UINT32)partition.size());
|
||||
info = usprintf("Full size: %Xh (%u)", (UINT32)partition.size(), (UINT32)partition.size());
|
||||
|
||||
// Add tree item
|
||||
model->addItem(partitions[i].ptEntry.Offset, Types::Padding, getPaddingType(partition), name, UString(), info, UByteArray(), partition, UByteArray(), Fixed, parent);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue