mirror of
https://github.com/LongSoft/UEFITool.git
synced 2024-11-25 17:38:22 +08:00
Fixed inconsistent use of %ll and %l format modifiers
This commit is contained in:
parent
e5b594c347
commit
7695927eec
@ -4504,8 +4504,8 @@ USTATUS FfsParser::parseBpdtRegion(const UByteArray & region, const UINT32 local
|
|||||||
|
|
||||||
// Get info
|
// Get info
|
||||||
name = bpdtEntryTypeToUString(ptEntry->Type);
|
name = bpdtEntryTypeToUString(ptEntry->Type);
|
||||||
info = usprintf("Full size: %lXh (%lu)\nType: %Xh\nPartition offset: %Xh\nPartition length: %Xh",
|
info = usprintf("Full size: %Xh (%u)\nType: %Xh\nPartition offset: %Xh\nPartition length: %Xh",
|
||||||
sizeof(BPDT_ENTRY), sizeof(BPDT_ENTRY),
|
(UINT32)sizeof(BPDT_ENTRY), (UINT32)sizeof(BPDT_ENTRY),
|
||||||
ptEntry->Type,
|
ptEntry->Type,
|
||||||
ptEntry->Offset,
|
ptEntry->Offset,
|
||||||
ptEntry->Size) +
|
ptEntry->Size) +
|
||||||
@ -4954,22 +4954,22 @@ make_partition_table_consistent:
|
|||||||
UByteArray body = partition.mid(manifestHeader->HeaderLength * sizeof(UINT32));
|
UByteArray body = partition.mid(manifestHeader->HeaderLength * sizeof(UINT32));
|
||||||
|
|
||||||
info = usprintf("Full size: %Xh (%u)\nHeader size: %Xh (%u)\nBody size: %Xh (%u)"
|
info = usprintf("Full size: %Xh (%u)\nHeader size: %Xh (%u)\nBody size: %Xh (%u)"
|
||||||
"\nHeader type: %u\nHeader length: %lXh (%lu)\nHeader version: %Xh\nFlags: %08Xh\nVendor: %Xh\n"
|
"\nHeader type: %u\nHeader length: %Xh (%u)\nHeader version: %Xh\nFlags: %08Xh\nVendor: %Xh\n"
|
||||||
"Date: %Xh\nSize: %lXh (%lu)\nVersion: %u.%u.%u.%u\nSecurity version number: %u\nModulus size: %lXh (%lu)\nExponent size: %lXh (%lu)",
|
"Date: %Xh\nSize: %Xh (%u)\nVersion: %u.%u.%u.%u\nSecurity version number: %u\nModulus size: %Xh (%u)\nExponent size: %Xh (%u)",
|
||||||
(UINT32)partition.size(), (UINT32)partition.size(),
|
(UINT32)partition.size(), (UINT32)partition.size(),
|
||||||
(UINT32)header.size(), (UINT32)header.size(),
|
(UINT32)header.size(), (UINT32)header.size(),
|
||||||
(UINT32)body.size(), (UINT32)body.size(),
|
(UINT32)body.size(), (UINT32)body.size(),
|
||||||
manifestHeader->HeaderType,
|
manifestHeader->HeaderType,
|
||||||
manifestHeader->HeaderLength * sizeof(UINT32), manifestHeader->HeaderLength * sizeof(UINT32),
|
manifestHeader->HeaderLength * (UINT32)sizeof(UINT32), manifestHeader->HeaderLength * (UINT32)sizeof(UINT32),
|
||||||
manifestHeader->HeaderVersion,
|
manifestHeader->HeaderVersion,
|
||||||
manifestHeader->Flags,
|
manifestHeader->Flags,
|
||||||
manifestHeader->Vendor,
|
manifestHeader->Vendor,
|
||||||
manifestHeader->Date,
|
manifestHeader->Date,
|
||||||
manifestHeader->Size * sizeof(UINT32), manifestHeader->Size * sizeof(UINT32),
|
manifestHeader->Size * (UINT32)sizeof(UINT32), manifestHeader->Size * (UINT32)sizeof(UINT32),
|
||||||
manifestHeader->VersionMajor, manifestHeader->VersionMinor, manifestHeader->VersionBugfix, manifestHeader->VersionBuild,
|
manifestHeader->VersionMajor, manifestHeader->VersionMinor, manifestHeader->VersionBugfix, manifestHeader->VersionBuild,
|
||||||
manifestHeader->SecurityVersion,
|
manifestHeader->SecurityVersion,
|
||||||
manifestHeader->ModulusSize * sizeof(UINT32), manifestHeader->ModulusSize * sizeof(UINT32),
|
manifestHeader->ModulusSize * (UINT32)sizeof(UINT32), manifestHeader->ModulusSize * (UINT32)sizeof(UINT32),
|
||||||
manifestHeader->ExponentSize * sizeof(UINT32), manifestHeader->ExponentSize * sizeof(UINT32));
|
manifestHeader->ExponentSize * (UINT32)sizeof(UINT32), manifestHeader->ExponentSize * (UINT32)sizeof(UINT32));
|
||||||
|
|
||||||
// Add tree item
|
// Add tree item
|
||||||
UModelIndex partitionIndex = model->addItem(localOffset + partitions[i].ptEntry.Offset.Offset, Types::CpdPartition, Subtypes::ManifestCpdPartition, name, UString(), info, header, body, UByteArray(), Fixed, parent);
|
UModelIndex partitionIndex = model->addItem(localOffset + partitions[i].ptEntry.Offset.Offset, Types::CpdPartition, Subtypes::ManifestCpdPartition, name, UString(), info, header, body, UByteArray(), Fixed, parent);
|
||||||
@ -5115,7 +5115,7 @@ USTATUS FfsParser::parseCpdExtensionsArea(const UModelIndex & index)
|
|||||||
// Add tree item
|
// Add tree item
|
||||||
extIndex = model->addItem(offset, Types::CpdExtension, 0, name, UString(), info, UByteArray(), partition, UByteArray(), Fixed, index);
|
extIndex = model->addItem(offset, Types::CpdExtension, 0, name, UString(), info, UByteArray(), partition, UByteArray(), Fixed, index);
|
||||||
if (msgHashSizeMismatch) {
|
if (msgHashSizeMismatch) {
|
||||||
msg(usprintf("%s: IFWI Partition Manifest hash size is %u, maximum allowed is %lu, truncated", __FUNCTION__, attrHeader->HashSize, sizeof(attrHeader->CompletePartitionHash)), extIndex);
|
msg(usprintf("%s: IFWI Partition Manifest hash size is %u, maximum allowed is %u, truncated", __FUNCTION__, attrHeader->HashSize, (UINT32)sizeof(attrHeader->CompletePartitionHash)), extIndex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Parse Module Attributes a bit further
|
// Parse Module Attributes a bit further
|
||||||
|
@ -190,8 +190,8 @@ USTATUS MeParser::parseFptRegion(const UByteArray & region, const UModelIndex &
|
|||||||
|
|
||||||
// Get info
|
// Get info
|
||||||
name = visibleAsciiOrHex((UINT8*)ptEntry->Name, 4);
|
name = visibleAsciiOrHex((UINT8*)ptEntry->Name, 4);
|
||||||
info = usprintf("Full size: %lXh (%lu)\nPartition offset: %Xh\nPartition length: %Xh\nPartition type: %02Xh",
|
info = usprintf("Full size: %Xh (%u)\nPartition offset: %Xh\nPartition length: %Xh\nPartition type: %02Xh",
|
||||||
sizeof(FPT_HEADER_ENTRY), sizeof(FPT_HEADER_ENTRY),
|
(UINT32)sizeof(FPT_HEADER_ENTRY), (UINT32)sizeof(FPT_HEADER_ENTRY),
|
||||||
ptEntry->Offset,
|
ptEntry->Offset,
|
||||||
ptEntry->Size,
|
ptEntry->Size,
|
||||||
ptEntry->Type);
|
ptEntry->Type);
|
||||||
@ -342,7 +342,7 @@ USTATUS MeParser::parseIfwi16Region(const UByteArray & region, const UModelIndex
|
|||||||
"Boot3 partition offset: %Xh\nBoot3 partition size: %Xh\n"
|
"Boot3 partition offset: %Xh\nBoot3 partition size: %Xh\n"
|
||||||
"Boot4 partition offset: %Xh\nBoot4 partition size: %Xh\n"
|
"Boot4 partition offset: %Xh\nBoot4 partition size: %Xh\n"
|
||||||
"Boot5 partition offset: %Xh\nBoot5 partition size: %Xh\n"
|
"Boot5 partition offset: %Xh\nBoot5 partition size: %Xh\n"
|
||||||
"Checksum: %llXh",
|
"Checksum: %" PRIX64 "h",
|
||||||
(UINT32)header.size(), (UINT32)header.size(),
|
(UINT32)header.size(), (UINT32)header.size(),
|
||||||
ifwiHeader->DataPartition.Offset, ifwiHeader->DataPartition.Size,
|
ifwiHeader->DataPartition.Offset, ifwiHeader->DataPartition.Size,
|
||||||
ifwiHeader->BootPartition[0].Offset, ifwiHeader->BootPartition[0].Size,
|
ifwiHeader->BootPartition[0].Offset, ifwiHeader->BootPartition[0].Size,
|
||||||
@ -350,7 +350,7 @@ USTATUS MeParser::parseIfwi16Region(const UByteArray & region, const UModelIndex
|
|||||||
ifwiHeader->BootPartition[2].Offset, ifwiHeader->BootPartition[2].Size,
|
ifwiHeader->BootPartition[2].Offset, ifwiHeader->BootPartition[2].Size,
|
||||||
ifwiHeader->BootPartition[3].Offset, ifwiHeader->BootPartition[3].Size,
|
ifwiHeader->BootPartition[3].Offset, ifwiHeader->BootPartition[3].Size,
|
||||||
ifwiHeader->BootPartition[4].Offset, ifwiHeader->BootPartition[4].Size,
|
ifwiHeader->BootPartition[4].Offset, ifwiHeader->BootPartition[4].Size,
|
||||||
(unsigned long long)ifwiHeader->Checksum);
|
ifwiHeader->Checksum);
|
||||||
// Add tree item
|
// Add tree item
|
||||||
index = model->addItem(0, Types::IfwiHeader, 0, name, UString(), info, UByteArray(), header, UByteArray(), Fixed, parent);
|
index = model->addItem(0, Types::IfwiHeader, 0, name, UString(), info, UByteArray(), header, UByteArray(), Fixed, parent);
|
||||||
|
|
||||||
|
@ -621,7 +621,7 @@ USTATUS NvramParser::findNextStore(const UModelIndex & index, const UByteArray &
|
|||||||
else if (ftwHeader->WriteQueueSize % 0x10 == 0x00) { // Header with 64 bit WriteQueueSize
|
else if (ftwHeader->WriteQueueSize % 0x10 == 0x00) { // Header with 64 bit WriteQueueSize
|
||||||
const EFI_FAULT_TOLERANT_WORKING_BLOCK_HEADER64* ftw64Header = (const EFI_FAULT_TOLERANT_WORKING_BLOCK_HEADER64*)currentPos;
|
const EFI_FAULT_TOLERANT_WORKING_BLOCK_HEADER64* ftw64Header = (const EFI_FAULT_TOLERANT_WORKING_BLOCK_HEADER64*)currentPos;
|
||||||
if (ftw64Header->WriteQueueSize == 0 || ftw64Header->WriteQueueSize >= 0xFFFFFFFF) {
|
if (ftw64Header->WriteQueueSize == 0 || ftw64Header->WriteQueueSize >= 0xFFFFFFFF) {
|
||||||
msg(usprintf("%s: FTW block candidate at offset %Xh skipped, has invalid body size %llXh", __FUNCTION__, localOffset + offset, (unsigned long long)ftw64Header->WriteQueueSize), index);
|
msg(usprintf("%s: FTW block candidate at offset %Xh skipped, has invalid body size %" PRIX64 "h", __FUNCTION__, localOffset + offset, ftw64Header->WriteQueueSize), index);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user