aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Menzel <pmenzel@molgen.mpg.de>2020-05-19 23:39:42 +0200
committerKevin O'Connor <kevin@koconnor.net>2020-05-21 13:38:27 -0400
commitc61193d3ec2e29c0764ce93ad17cea259c57faad (patch)
treeb6589c89c315d83712c2dbebffa636540810c43e
parentb8eda131954452bb5a236100a6572fe8f27d8021 (diff)
downloadseabios-hppa-c61193d3ec2e29c0764ce93ad17cea259c57faad.zip
seabios-hppa-c61193d3ec2e29c0764ce93ad17cea259c57faad.tar.gz
seabios-hppa-c61193d3ec2e29c0764ce93ad17cea259c57faad.tar.bz2
boot: Extend `etc/show-boot-menu` to configure skipping boot menu with only one device
Concerns were raised, that skipping the boot menu, if only one device is present, might make debugging issues more difficult. So, extend the current runtime configuration option `etc/show-boot-menu` to enable this feature by setting it to 2. Fixes: 29ee1fb8 ("Skip boot menu and timeout with only one boot device") Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
-rw-r--r--docs/Runtime_config.md2
-rw-r--r--src/boot.c5
2 files changed, 4 insertions, 3 deletions
diff --git a/docs/Runtime_config.md b/docs/Runtime_config.md
index 6747e2a..5795382 100644
--- a/docs/Runtime_config.md
+++ b/docs/Runtime_config.md
@@ -173,7 +173,7 @@ There are several additional configuration options available in the
| Filename | Description
|---------------------|---------------------------------------------------
-| show-boot-menu | Controls the display of the boot menu. Set to 0 to disable the boot menu.
+| show-boot-menu | Controls the display of the boot menu. Valid values are 0: Disable the boot menu, 1: Display boot menu unconditionally, 2: Skip boot menu if only one device is present. The default is 1.
| boot-menu-message | Customize the text boot menu message. Normally, when in text mode SeaBIOS will report the string "\\nPress ESC for boot menu.\\n\\n". This field allows the string to be changed. (This is a string field, and is added as a file containing the raw string.)
| boot-menu-key | Controls which key activates the boot menu. The value stored is the DOS scan code (eg, 0x86 for F12, 0x01 for Esc). If this field is set, be sure to also customize the **boot-menu-message** field above.
| boot-menu-wait | Amount of time (in milliseconds) to wait at the boot menu prompt before selecting the default boot.
diff --git a/src/boot.c b/src/boot.c
index cc87b1d..a395347 100644
--- a/src/boot.c
+++ b/src/boot.c
@@ -685,12 +685,13 @@ void
interactive_bootmenu(void)
{
// XXX - show available drives?
+ u64 show_boot_menu = romfile_loadint("etc/show-boot-menu", 1);
- if (! CONFIG_BOOTMENU || !romfile_loadint("etc/show-boot-menu", 1))
+ if (! CONFIG_BOOTMENU || show_boot_menu != 0)
return;
// skip menu if only one boot device and no TPM
- if ((NULL == BootList.first->next) && !tpm_can_show_menu()) {
+ if ((show_boot_menu == 2) && (NULL == BootList.first->next) && !tpm_can_show_menu()) {
printf("\n");
return;
}