Files
mango/arch/user/stdcon.c
Max Wash 6019c9307d kernel: separate headers into kernel and user headers
all kernel headers have been moved from include/mango to include/kernel
and include definitions that are only relevant to kernel-space.

any definitions that are relevant to both kernel- and user-space
(i.e. type definitions, syscall IDs) have been moved to
include/mango within libmango.
2026-02-19 18:54:48 +00:00

28 lines
550 B
C

#include <kernel/libc/string.h>
#include <kernel/libc/ctype.h>
#include <stdint.h>
#include <stdio.h>
#include <kernel/console.h>
#include <kernel/vm.h>
#include <kernel/printk.h>
static void stdcon_write(struct console *con, const char *s, unsigned int len)
{
for (unsigned int i = 0; i < len; i++) {
fputc(s[i], stdout);
}
}
static struct console 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);
}