]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-boot: rename LOADER_STUB → LOADER_UNIFIED_LINUX
authorLennart Poettering <lennart@poettering.net>
Wed, 2 Feb 2022 16:28:35 +0000 (17:28 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 3 Feb 2022 04:44:28 +0000 (13:44 +0900)
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.

src/boot/efi/boot.c

index eed5bcc9610add3cbcb77e121a95537d10e26ddd..48b0352a057c45425ee90f59f3035112ad0cdcfd 100644 (file)
@@ -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,