avoid unneeded printing in the kernel message buffer

This commit is contained in:
Stefan Lankes 2011-09-25 20:49:01 +02:00
parent 046850b690
commit 012d3938a2

View file

@ -22,9 +22,13 @@
#include <metalsvm/stdio.h>
#include <metalsvm/errno.h>
#include <metalsvm/fs.h>
#include <asm/kb.h>
#include <metalsvm/tasks.h>
#include <metalsvm/spinlock.h>
#include <asm/kb.h>
#include <asm/io.h>
#ifdef CONFIG_VGA
#include <asm/vga.h>
#endif
/* Functions of a simple null device */
@ -80,7 +84,13 @@ static ssize_t stdio_write(fildes_t* file, uint8_t* buffer, size_t size)
{
int i;
for (i = 0; i<size; i++, buffer++) {
#ifdef CONFIG_VGA
vga_putchar(*buffer);
#elif defined(CONFIG_UART)
uart_putchar(*buffer);
#else
kputchar(*buffer);
#endif
}
file->offset += size;