]> git.ipfire.org Git - thirdparty/systemd.git/commit
sd-boot: Add a 0.1 second delay before key-probing for showing menu
authorLeonid Bloch <lbloch@janustech.com>
Sun, 1 Dec 2019 23:05:02 +0000 (01:05 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 4 Dec 2019 09:52:28 +0000 (10:52 +0100)
commit26601a2a17716ec55ae1e619e5bcfaf460ccf1a2
tree8ad30fc76f318a564c910a7426d23f931475903c
parent9f537ae3100f8372579daea53c24fff917cc3257
sd-boot: Add a 0.1 second delay before key-probing for showing menu

If there is no boot menu timeout, pressing a key during boot should get
the boot menu displayed. However, on some systems the keyboard is not
initialized right away, which causes the menu to be inaccessible if no
timeout is specified.

To resolve this, if the error is "not ready" after the initial attempt of
detection, wait for 0.1 second and retry. This solves the problem
described above on all the tested systems.

The reason for just a single retry, and not retrying while "not ready",
is that some firmwares continue to return the "not ready" error on
every probe attempt if no key is pressed.

Signed-off-by: Leonid Bloch <lb.workbox@gmail.com>
src/boot/efi/boot.c