]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-boot: make sure special menu items also work if menu is skipped
authorLennart Poettering <lennart@poettering.net>
Tue, 23 Oct 2018 11:43:10 +0000 (13:43 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 16 Nov 2018 14:47:18 +0000 (15:47 +0100)
While it doesn't really make much sense to set "auto-reboot-to-firmware"
as oneshot boot item, let's still support it properly, by also
dispatching such a menu item if selected.

src/boot/efi/boot.c

index e62c76633553b55ae1e9b408ea316bf265709413..d3a26fd7a0e0d0c18197ce1dc4f8febf0a2a85e9 100644 (file)
@@ -2215,12 +2215,12 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) {
                         uefi_call_wrapper(BS->SetWatchdogTimer, 4, 0, 0x10000, 0, NULL);
                         if (!menu_run(&config, &entry, loaded_image_path))
                                 break;
+                }
 
-                        /* run special entry like "reboot" */
-                        if (entry->call) {
-                                entry->call();
-                                continue;
-                        }
+                /* run special entry like "reboot" */
+                if (entry->call) {
+                        entry->call();
+                        continue;
                 }
 
                 config_entry_bump_counters(entry, root_dir);