aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/syscall/actions/sys_write.c
blob: 554ac5f7fa2115cec152ee5a3f56a6fddbc1aefc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <stdint.h>
#include <kernel/lib/stdio.h>
#include <kernel/lib/string.h>
#include <kernel/io/io.h>

uint32_t sys_write(char *buf)
{
    printf(buf);
    return strlen((const char *) buf);
}

uint32_t sys_writec(char ch)
{
    serial_write_hex(ch);
    serial_write("\n");
    serial_put(ch);
    serial_write("\n\n");
    writec(ch);
    return 0;
}