]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
pe: do not warn about .initrd addons
authorLuca Boccassi <luca.boccassi@gmail.com>
Thu, 30 Jan 2025 01:51:05 +0000 (01:51 +0000)
committerLennart Poettering <lennart@poettering.net>
Thu, 30 Jan 2025 08:27:42 +0000 (09:27 +0100)
We now support them, so stop warning about them.

src/shared/pe-binary.c

index c50aad18f378defbecd28789f7e0b652fab9bfe8..173c5adf9027a53a7699907f28271bd27e0feaf9 100644 (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"));
 }