1
0
mirror of https://github.com/rcore-os/rCore.git synced 2024-11-21 23:56:18 +04:00

Do not print to graphci console unless graphic=console on aarch64

This commit is contained in:
Jiajie Chen 2019-06-03 09:47:57 +08:00
parent d8ea224283
commit 8e5e798d78

View File

@ -13,8 +13,12 @@ pub fn putfmt(fmt: Arguments) {
unsafe { SERIAL_PORT.force_unlock() }
SERIAL_PORT.lock().write_fmt(fmt).unwrap();
unsafe { CONSOLE.force_unlock() }
if let Some(console) = CONSOLE.lock().as_mut() {
console.write_fmt(fmt).unwrap();
// print to graphic
#[cfg(feature = "consolegraphic")]
{
unsafe { CONSOLE.force_unlock() }
if let Some(console) = CONSOLE.lock().as_mut() {
console.write_fmt(fmt).unwrap();
}
}
}