From: Lennart Poettering Date: Wed, 2 Feb 2022 16:28:35 +0000 (+0100) Subject: sd-boot: rename LOADER_STUB → LOADER_UNIFIED_LINUX X-Git-Tag: v251-rc1~367 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=362c62296aa76815b40cac63bd370401a305c793;p=thirdparty%2Fsystemd.git sd-boot: rename LOADER_STUB → LOADER_UNIFIED_LINUX No actual code changes, just renaming. Rationale: the focus here should be on the fact that these are "unified" images, whether our stub is used or not, or something else doesn't really matter. Moreover, these are still Linux entries. Hence, emphasize that these are *unified* images, and *Linux* images, and deemphesize that our sd-stub is likely used. --- diff --git a/src/boot/efi/boot.c b/src/boot/efi/boot.c index eed5bcc9610..48b0352a057 100644 --- a/src/boot/efi/boot.c +++ b/src/boot/efi/boot.c @@ -44,8 +44,8 @@ enum loader_type { LOADER_UNDEFINED, LOADER_AUTO, LOADER_EFI, - LOADER_LINUX, - LOADER_STUB, + LOADER_LINUX, /* Boot loader spec type #1 entries */ + LOADER_UNIFIED_LINUX, /* Boot loader spec type #2 entries */ }; typedef struct { @@ -856,13 +856,13 @@ static BOOLEAN menu_run( case KEYPRESS(0, 0, 'E'): /* only the options of configured entries can be edited */ if (!config->editor || !IN_SET(config->entries[idx_highlight]->type, - LOADER_EFI, LOADER_LINUX, LOADER_STUB)) + LOADER_EFI, LOADER_LINUX, LOADER_UNIFIED_LINUX)) break; - /* The stub will not accept command line options when secure boot is enabled - * unless there is none embedded in the image. Do not try to pretend we - * can edit it to only have it be ignored. */ - if (config->entries[idx_highlight]->type == LOADER_STUB && + /* Unified kernels that are signed as a whole will not accept command line options + * when secure boot is enabled unless there is none embedded in the image. Do not try + * to pretend we can edit it to only have it be ignored. */ + if (config->entries[idx_highlight]->type == LOADER_UNIFIED_LINUX && secure_boot_enabled() && config->entries[idx_highlight]->options) break; @@ -2196,7 +2196,7 @@ static void config_entry_add_linux( entry = config_entry_add_loader( config, device, - LOADER_STUB, + LOADER_UNIFIED_LINUX, f->FileName, /* key= */ 'l', good_name,