Setting different error message for boot failure when booting from menu or booting from the editor

This commit is contained in:
iillis 2024-06-07 23:31:28 +02:00 committed by mintsuki
parent 6ae857bc4c
commit d0124c5bed
4 changed files with 10 additions and 2 deletions

View File

@ -52,7 +52,12 @@ noreturn void panic(bool allow_menu, const char *fmt, ...) {
efi_boot_services_exited == false &&
#endif
allow_menu == true) {
print("Press a key to return to menu.");
if (booting_from_editor == true) {
print("Press a key to return to editor.");
}
else {
print("Press a key to return to menu.");
}
getchar();

View File

@ -36,6 +36,7 @@ SECTIONS
full_map = .;
getchar = .;
menu = .;
booting_from_editor = .;
flanterm_write = .;
term_backend = .;
term_fallback = .;

View File

@ -38,7 +38,7 @@ EFI_GUID limine_efi_vendor_guid =
static char *menu_branding = NULL;
static char *menu_branding_colour = NULL;
static no_unwind bool booting_from_editor = false;
no_unwind bool booting_from_editor = false;
static no_unwind char saved_orig_entry[EDITOR_MAX_BUFFER_SIZE];
static no_unwind char saved_title[64];

View File

@ -15,4 +15,6 @@ noreturn void boot(char *config);
char *config_entry_editor(const char *title, const char *orig_entry);
extern bool booting_from_editor;
#endif