From f7e7a9122b223fea0188d9641affbd4b31d7c853 Mon Sep 17 00:00:00 2001 From: Alex Zenla Date: Sat, 26 Sep 2026 18:12:21 -0700 Subject: [PATCH] fix(menu): ignore key events without an available key Some firmware signals the key event without a key being available. This previously aborted boot with "no key was pressed"; treat it as a no-op and keep waiting instead. --- crates/boot/src/menu.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/boot/src/menu.rs b/crates/boot/src/menu.rs index 854d2d3..c21b273 100644 --- a/crates/boot/src/menu.rs +++ b/crates/boot/src/menu.rs @@ -1,6 +1,6 @@ use crate::entries::BootableEntry; use alloc::vec; -use anyhow::{Context, Result, bail}; +use anyhow::{Context, Result}; use core::time::Duration; use eficore::bootloader_interface::BootloaderInterface; use eficore::platform::timer::PlatformTimer; @@ -86,8 +86,10 @@ fn read(input: &mut Input, timeout: &Duration) -> Result { } // If we reach here, there is a key event. + // Some firmware signals the key event without a key being available, + // in which case there is nothing to do. let Some(key) = input.read_key().context("unable to read key")? else { - bail!("no key was pressed"); + return Ok(MenuOperation::Nop); }; match key {