From 7f1dced95ff2e2e96de927379cb4f58e9208f630 Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Mon, 15 Apr 2024 08:21:12 +0800 Subject: [PATCH] chromium_mod: Don't crash on ctrl+c in UEFI Signed-off-by: Daniel Schaefer --- framework_lib/src/chromium_ec/mod.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/framework_lib/src/chromium_ec/mod.rs b/framework_lib/src/chromium_ec/mod.rs index 878b9e8..c5043d3 100644 --- a/framework_lib/src/chromium_ec/mod.rs +++ b/framework_lib/src/chromium_ec/mod.rs @@ -536,7 +536,11 @@ impl CrosEc { for chunk_no in 0..chunks { #[cfg(feature = "uefi")] if shell_get_execution_break_flag() { - return Err(EcError::DeviceError("Execution interrupted".to_string())); + // TODO: We don't want to crash here. But returning no data doesn't seem optimal + // either + // return Err(EcError::DeviceError("Execution interrupted".to_string())); + println!("Execution interrupted"); + return Ok(vec![]); } let offset = offset + chunk_no * chunk_size;