Files
kern/libk/syscalls/sys_write.c
T
2024-10-23 14:11:22 +02:00

16 lines
316 B
C

#include <syscalls/syscalls.h>
#include <tty/tty.h>
#include <interrupt/isr.h>
#include <stddef.h>
int sys_write(intFrame_t* iframe) {
int fd = iframe->ebx;
void* buf = (void*)iframe->ecx;
size_t len = iframe->edx;
if (fd == 1) {
return consoleWrite(buf, len);
} else { return -1; }
}