:: commit 0b41786e9d08c5d5f8364f675adaee3573ca47ac

mintsuki <mintsuki@protonmail.com> — 2025-02-11 21:26

parents: db8f63bdfd

config: Add aliases for BIOS and EFI chainload protocol options

diff --git a/CONFIG.md b/CONFIG.md
index c4343e40..e578bf7e 100644
--- a/CONFIG.md
+++ b/CONFIG.md
@@ -113,10 +113,12 @@ Editor control options:
 *Locally assignable (non protocol specific) options* are:
 
 * `comment` - An optional comment string that will be displayed by the bootloader on the menu when an entry is selected.
-* `protocol` - The boot protocol that will be used to boot the kernel/executable. Valid protocols are: `linux`, `limine`, `multiboot` (or `multiboot1`), `multiboot2`, `efi_chainload`, `bios_chainload`, and `chainload_next`.
+* `protocol` - The boot protocol that will be used to boot the kernel/executable. Valid protocols are: `linux`, `limine`, `multiboot` (or `multiboot1`), `multiboot2`, `efi`, `bios`, and `chainload_next`.
 * `cmdline` - The command line string to be passed to the kernel/executable. Can be omitted.
 * `kernel_cmdline` - Alias of `cmdline`.
 
+Note: `uefi` and `efi_chainload` are aliases of the `efi` protocol option. `bios_chainload` is an alias of the `bios` protocol option.
+
 *Locally assignable (protocol specific) options* are:
 
 * Linux protocol:
diff --git a/common/menu.c b/common/menu.c
index 7aa900fa..4d08a4cb 100644
--- a/common/menu.c
+++ b/common/menu.c
@@ -1197,9 +1197,12 @@ noreturn void boot(char *config) {
     } else if (!strcmp(proto, "chainload_next")) {
         chainload_next(config, cmdline);
 #if defined (BIOS)
-    } else if (!strcmp(proto, "bios_chainload")) {
+    } else if (!strcmp(proto, "bios_chainload")
+            || !strcmp(proto, "bios")) {
 #elif defined (UEFI)
-    } else if (!strcmp(proto, "efi_chainload")) {
+    } else if (!strcmp(proto, "efi_chainload")
+            || !strcmp(proto, "efi")
+            || !strcmp(proto, "uefi")) {
 #endif
         chainload(config, cmdline);
     }
tab: 248 wrap: offon