Reimplement the terminal user access via separate syscalls

This commit is contained in:
2025-11-15 00:38:54 +01:00
parent 3726cc49da
commit ecee481b33
8 changed files with 32 additions and 36 deletions

18
kernel/syscall/term.c Normal file
View File

@ -0,0 +1,18 @@
#include <stdint.h>
#include <stddef.h>
#include "syscall/syscall.h"
#include "kprintf.h"
#include "errors.h"
int32_t SYSCALL2(sys_term_write, buffer1, len1) {
const char *buffer = (const char *)buffer1;
size_t len = len1;
if (buffer == NULL) {
return E_INVALIDARGUMENT;
}
kprintf("%.*s", (int)len, buffer);
return E_OK;
}