term: Check if any terminal is actually initialised in reset_term()
diff --git a/stage23/entry.s3.c b/stage23/entry.s3.c
index a5e50e6c..37b8e7e4 100644
--- a/stage23/entry.s3.c
+++ b/stage23/entry.s3.c
@@ -155,7 +155,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);
}
diff --git a/stage23/lib/term.h b/stage23/lib/term.h
index 0338e1d3..0734cc35 100644
--- a/stage23/lib/term.h
+++ b/stage23/lib/term.h
@@ -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
