diff --git a/src/arch/x86/kernel/mod.rs b/src/arch/x86/kernel/mod.rs index 6c5f6f5c..688cb90b 100644 --- a/src/arch/x86/kernel/mod.rs +++ b/src/arch/x86/kernel/mod.rs @@ -11,6 +11,6 @@ core::arch::global_asm!(include_str!("entry.s")); pub(crate) fn init() { processor::cpu_init(); - #[cfg(all(target_arch = "x86", feature = "vga"))] + #[cfg(feature = "vga")] vga::init(); } diff --git a/src/console.rs b/src/console.rs index cbcf6eea..a6b8a6ed 100644 --- a/src/console.rs +++ b/src/console.rs @@ -1,8 +1,8 @@ //! A wrapper around our serial console. -#[cfg(not(all(target_arch = "x86", feature = "vga")))] +#[cfg(not(feature = "vga"))] use crate::arch::serial; -#[cfg(all(target_arch = "x86", feature = "vga"))] +#[cfg(feature = "vga")] use crate::arch::vga; use core::fmt; @@ -12,7 +12,7 @@ impl fmt::Write for Console { /// Output a string to each of our console outputs. fn write_str(&mut self, s: &str) -> fmt::Result { cfg_if::cfg_if! { - if #[cfg(all(target_arch = "x86", feature = "vga"))] { + if #[cfg(feature = "vga")] { vga::VGA_SCREEN.lock().write_str(s) } else { serial::COM1.lock().write_str(s)