Rename vga_buffer::print function to avoid name clash with macro

This commit is contained in:
Philipp Oppermann
2018-11-18 13:59:31 +01:00
parent 6e5ebc4bd9
commit fc4542463b

View File

@@ -151,7 +151,7 @@ impl fmt::Write for Writer {
/// Like the `print!` macro in the standard library, but prints to the VGA text buffer. /// Like the `print!` macro in the standard library, but prints to the VGA text buffer.
#[macro_export] #[macro_export]
macro_rules! print { macro_rules! print {
($($arg:tt)*) => ($crate::vga_buffer::print(format_args!($($arg)*))); ($($arg:tt)*) => ($crate::vga_buffer::_print(format_args!($($arg)*)));
} }
/// Like the `print!` macro in the standard library, but prints to the VGA text buffer. /// Like the `print!` macro in the standard library, but prints to the VGA text buffer.
@@ -163,7 +163,7 @@ macro_rules! println {
} }
/// Prints the given formatted string to the VGA text buffer through the global `WRITER` instance. /// Prints the given formatted string to the VGA text buffer through the global `WRITER` instance.
pub fn print(args: fmt::Arguments) { pub fn _print(args: fmt::Arguments) {
use core::fmt::Write; use core::fmt::Write;
use x86_64::instructions::interrupts; use x86_64::instructions::interrupts;