diff --git a/kernel/src/arch/x86_64/io.rs b/kernel/src/arch/x86_64/io.rs index a25c655..c59ac60 100644 --- a/kernel/src/arch/x86_64/io.rs +++ b/kernel/src/arch/x86_64/io.rs @@ -10,18 +10,22 @@ pub fn getchar() -> char { } pub fn putfmt(fmt: Arguments) { - //#[cfg(feature = "nographic")] - //{ + #[cfg(feature = "nographic")] + { + unsafe { + COM1.force_unlock(); + } + COM1.lock().write_fmt(fmt).unwrap(); + } + #[cfg(not(feature = "nographic"))] + { unsafe { COM1.force_unlock(); } COM1.lock().write_fmt(fmt).unwrap(); - //} - //#[cfg(not(feature = "nographic"))] - //{ //unsafe { //VGA_WRITER.force_unlock(); //} //VGA_WRITER.lock().write_fmt(fmt).unwrap(); - //} + } }