28 lines
535 B
C
28 lines
535 B
C
#include <socks/libc/string.h>
|
|
#include <socks/libc/ctype.h>
|
|
#include <stdint.h>
|
|
#include <stdio.h>
|
|
#include <socks/console.h>
|
|
#include <socks/vm.h>
|
|
#include <socks/printk.h>
|
|
|
|
static void stdcon_write(console_t *con, const char *s, unsigned int len)
|
|
{
|
|
for (unsigned int i = 0; i < len; i++) {
|
|
fputc(s[i], stdout);
|
|
}
|
|
}
|
|
|
|
static console_t stdcon = {
|
|
.c_name = "stdcon",
|
|
.c_flags = CON_BOOT,
|
|
.c_write = stdcon_write,
|
|
.c_lock = SPIN_LOCK_INIT,
|
|
};
|
|
|
|
void stdcon_init(void)
|
|
{
|
|
console_register(&stdcon);
|
|
early_printk_init(&stdcon);
|
|
}
|