Skip to content

Commit

Permalink
chromium_mod: Don't crash on ctrl+c in UEFI
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Schaefer <[email protected]>
  • Loading branch information
JohnAZoidberg committed Apr 28, 2024
1 parent 1ff0e04 commit 5b9332c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion framework_lib/src/chromium_ec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,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;
Expand Down

0 comments on commit 5b9332c

Please sign in to comment.