diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2020-05-24 21:57:19 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2020-05-24 21:57:19 -0400 |
commit | d9aea4a7cd59e00f5ed96b6442806dde0959e1ca (patch) | |
tree | 9ddb12cb66474f84442c722324f1042602eafa17 | |
parent | 926fd4e05e667e7835073ee7c8612c11e23dc57f (diff) | |
download | seabios-hppa-d9aea4a7cd59e00f5ed96b6442806dde0959e1ca.zip seabios-hppa-d9aea4a7cd59e00f5ed96b6442806dde0959e1ca.tar.gz seabios-hppa-d9aea4a7cd59e00f5ed96b6442806dde0959e1ca.tar.bz2 |
boot: Fixup check for only one item in boot list
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rw-r--r-- | src/boot.c | 17 |
1 files changed, 9 insertions, 8 deletions
@@ -684,17 +684,18 @@ static const char menuchars[] = { void interactive_bootmenu(void) { - // XXX - show available drives? - u64 show_boot_menu = romfile_loadint("etc/show-boot-menu", 1); - - if (! CONFIG_BOOTMENU || show_boot_menu == 0) + if (! CONFIG_BOOTMENU) + return; + int show_boot_menu = romfile_loadint("etc/show-boot-menu", 1); + if (!show_boot_menu) return; // skip menu if only one boot device and no TPM - if ((show_boot_menu == 2) && (NULL == BootList.first->next) && !tpm_can_show_menu()) { - dprintf(1, "Only one boot device present. Skip boot menu.\n"); - printf("\n"); - return; + if (show_boot_menu == 2 && !tpm_can_show_menu() + && !hlist_empty(&BootList) && !BootList.first->next) { + dprintf(1, "Only one boot device present. Skip boot menu.\n"); + printf("\n"); + return; } while (get_keystroke(0) >= 0) |