diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2013-08-02 14:13:50 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2013-08-02 14:23:42 -0400 |
commit | 129f11e1c81524f0121e3051888bd452da9d7d96 (patch) | |
tree | 6b20d9b12e029eedcd841166ae70b15004f93198 | |
parent | 1a113e1144113348e04cbe39fa81a448049e82a0 (diff) | |
download | seabios-129f11e1c81524f0121e3051888bd452da9d7d96.tar.gz |
Support custom boot menu prompt and custom boot menu key.
Allow configuration of the boot menu prompt and boot menu key (via the
romfile interface). Some machines don't have an F12 key, so make this
configurable.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rw-r--r-- | src/boot.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -413,14 +413,16 @@ interactive_bootmenu(void) while (get_keystroke(0) >= 0) ; - printf("\nPress F12 for boot menu.\n\n"); + char *bootmsg = romfile_loadfile("etc/boot-menu-message", NULL); + int menukey = romfile_loadint("etc/boot-menu-key", 0x86); + printf("%s", bootmsg ?: "\nPress F12 for boot menu.\n\n"); + free(bootmsg); u32 menutime = romfile_loadint("etc/boot-menu-wait", DEFAULT_BOOTMENU_WAIT); enable_bootsplash(); int scan_code = get_keystroke(menutime); disable_bootsplash(); - if (scan_code != 0x86) - /* not F12 */ + if (scan_code != menukey) return; while (get_keystroke(0) >= 0) |