blob: 6730800d867c2a77fe9f9441427ae7587629ab3c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#include <kernel/arch/amd64/driver/serial.h>
#include <kernel/arch/amd64/tty/tty.h>
#include <kernel/arch/generic.h>
#include <shared/printf.h>
void tty_init(void) {
serial_preinit();
serial_write("<3 ", 3);
}
static void backend(void __attribute__((unused)) *arg, const char *buf, size_t len) {
serial_write(buf, len);
}
int kprintf(const char *fmt, ...) {
int ret;
va_list argp;
va_start(argp, fmt);
ret = __printf_internal(fmt, argp, backend, NULL);
va_end(argp);
return ret;
}
|