From 298cac6d8486998a531aacd901cd3ce30c0faedf Mon Sep 17 00:00:00 2001 From: João Paulo Rechi Vita Date: Tue, 9 Mar 2021 14:07:56 -0800 Subject: fallback: Make verbose mode's wait time configurable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Make it possible to configure at build time for how long fallback will wait before moving to the next step when in verbose mode. Also remind the user they can press the Pause key to pause the boot process at that point. Signed-off-by: João Paulo Rechi Vita --- fallback.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'fallback.c') diff --git a/fallback.c b/fallback.c index 4a7a8eea..79d736c2 100644 --- a/fallback.c +++ b/fallback.c @@ -942,8 +942,14 @@ try_start_first_option(EFI_HANDLE parent_image_handle) EFI_HANDLE image_handle; if (get_fallback_verbose()) { - console_print(L"Verbose enabled, sleeping for half a second\n"); - msleep(500000); + int fallback_verbose_wait = 500000; /* default to 0.5s */ +#ifdef FALLBACK_VERBOSE_WAIT + fallback_verbose_wait = FALLBACK_VERBOSE_WAIT; +#endif + console_print(L"Verbose enabled, sleeping for %d mseconds... " + L"Press the Pause key now to hold for longer.\n", + fallback_verbose_wait); + msleep(fallback_verbose_wait); } if (!first_new_option) { @@ -1137,8 +1143,14 @@ reset: console_print(L"Reset System\n"); if (get_fallback_verbose()) { - console_print(L"Verbose enabled, sleeping for half a second\n"); - msleep(500000); + int fallback_verbose_wait = 500000; /* default to 0.5s */ +#ifdef FALLBACK_VERBOSE_WAIT + fallback_verbose_wait = FALLBACK_VERBOSE_WAIT; +#endif + console_print(L"Verbose enabled, sleeping for %d mseconds... " + L"Press the Pause key now to hold for longer.\n", + fallback_verbose_wait); + msleep(fallback_verbose_wait); } gRT->ResetSystem(EfiResetCold, EFI_SUCCESS, 0, NULL); -- cgit v1.2.3