mirror of
https://github.com/Tom-on64/kern.git
synced 2026-11-03 18:22:22 +00:00
16 lines
313 B
C
16 lines
313 B
C
#include <syscalls/syscalls.h>
|
|
#include <screen/tty.h>
|
|
#include <cpu/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; }
|
|
}
|
|
|