:: commit 2a0913c1f39b93bc055bb56de2d4afbc82d08fc0

mintsuki <mintsuki@protonmail.com> — 2024-06-12 00:00

parents: da52f2317e

lib/panic: efi: Disallow returning to menu after exiting boot services

diff --git a/common/lib/panic.s2.c b/common/lib/panic.s2.c
index 52c66d71..7c57315d 100644
--- a/common/lib/panic.s2.c
+++ b/common/lib/panic.s2.c
@@ -48,6 +48,8 @@ noreturn void panic(bool allow_menu, const char *fmt, ...) {
     if (
 #if defined (BIOS)
       stage3_loaded == true &&
+#elif defined (UEFI)
+      efi_boot_services_exited == false &&
 #endif
       allow_menu == true) {
         print("Press a key to return to %s.", booting_from_editor ? "editor" : "menu");
tab: 248 wrap: offon