pe: do not warn about .initrd addons

We now support them, so stop warning about them.
This commit is contained in:
Luca Boccassi
2025-01-30 09:27:42 +01:00
committed by Lennart Poettering
parent 164295eb6d
commit f6928e6b5d
+2 -1
View File
@@ -272,10 +272,11 @@ bool pe_is_addon(const PeHeader *pe_header, const IMAGE_SECTION_HEADER *sections
if (le16toh(pe_header->optional.Subsystem) != IMAGE_SUBSYSTEM_EFI_APPLICATION)
return false;
/* Add-ons do not have a Linux kernel, but do have either .cmdline or .dtb (currently) */
/* Add-ons do not have a Linux kernel, but do have one of .cmdline, .dtb, .initrd or .ucode (currently) */
return !pe_header_find_section(pe_header, sections, ".linux") &&
(pe_header_find_section(pe_header, sections, ".cmdline") ||
pe_header_find_section(pe_header, sections, ".dtb") ||
pe_header_find_section(pe_header, sections, ".initrd") ||
pe_header_find_section(pe_header, sections, ".ucode"));
}