From dc4e839e17d03de394b910cc10bf903d2b37bd0b Mon Sep 17 00:00:00 2001 From: Ryan Cohen Date: Tue, 11 Oct 2022 11:56:52 -0400 Subject: [PATCH] uefi-services: Change panic handler log message. The panic handler now displays its log message using `println!` instead of `error!`. The message prefix is altered from [ERROR] to [PANIC]. The extraneous filename and line number printed by `error!` are also removed from the log message. --- CHANGELOG.md | 3 +++ uefi-services/src/lib.rs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 00dabe59c..5636458e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -90,6 +90,9 @@ - The `no_panic_handler` feature has been replaced with an additive `panic_handler` feature. The new feature is enabled by default. +- Changed the panic handler log message to use `println!` instead of + `error!`. This removes an extraneous file name and line number from + the log message. ## uefi - 0.16.1 diff --git a/uefi-services/src/lib.rs b/uefi-services/src/lib.rs index a352834ba..4361ebda0 100644 --- a/uefi-services/src/lib.rs +++ b/uefi-services/src/lib.rs @@ -181,7 +181,7 @@ unsafe extern "efiapi" fn exit_boot_services(_e: Event, _ctx: Option ! { - error!("{}", info); + println!("[PANIC]: {}", info); // Give the user some time to read the message if let Some(st) = unsafe { SYSTEM_TABLE.as_ref() } {