term: Check if any terminal is actually initialised in reset_term()

This commit is contained in:
mintsuki 2021-10-11 21:08:32 +02:00
parent 2b11825b20
commit 4f064b30cd
2 changed files with 7 additions and 5 deletions

View File

@ -153,7 +153,7 @@ void stage3_common(void) {
init_io_apics();
if (verbose) {
print("Boot drive: %x\n", boot_volume->index);
print("Boot drive: %d\n", boot_volume->index);
print("Boot partition: %d\n", boot_volume->partition);
}

View File

@ -95,10 +95,12 @@ extern void (*term_callback)(uint64_t, uint64_t, uint64_t, uint64_t);
extern bool term_autoflush;
inline void reset_term(void) {
term_autoflush = true;
enable_cursor();
clear(true);
term_double_buffer_flush();
if (term_backend != NOT_READY) {
term_autoflush = true;
enable_cursor();
clear(true);
term_double_buffer_flush();
}
}
#endif