misc: Fix bug on trunk where returns to menu from panic would crash

This commit is contained in:
mintsuki 2023-02-16 03:54:10 +01:00
parent e909489635
commit 48053fd206
4 changed files with 6 additions and 4 deletions

View File

@ -130,5 +130,7 @@ noreturn void stage3_common(void) {
init_io_apics();
#endif
term_notready();
menu(true);
}

View File

@ -54,6 +54,9 @@ noreturn void panic(bool allow_menu, const char *fmt, ...) {
getchar();
// This fixes a crash
term_notready();
menu(false);
/*
fb_clear(&fbinfo);

View File

@ -43,6 +43,7 @@ SECTIONS
term_write = .;
term_backend = .;
term_fallback = .;
term_notready = .;
terms = .;
terms_i = .;
stage3_addr = .;

View File

@ -625,10 +625,6 @@ noreturn void _menu(bool first_run) {
#endif
}
if (!first_run) {
term_fallback();
}
if (bad_config == false) {
#if defined (UEFI)
if (init_config_disk(boot_volume)) {