From 60e89b6b9cf2af1ebd7e71c8624282b9ecd79a09 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Tue, 19 Mar 2024 23:03:26 -0400 Subject: kernel: syscall: Add sys_write() Signed-off-by: Ian Moffett --- sys/include/sys/filedesc.h | 3 +++ sys/include/sys/syscall.h | 1 + 2 files changed, 4 insertions(+) (limited to 'sys/include') diff --git a/sys/include/sys/filedesc.h b/sys/include/sys/filedesc.h index ef74fb1..df30c69 100644 --- a/sys/include/sys/filedesc.h +++ b/sys/include/sys/filedesc.h @@ -32,6 +32,7 @@ #include #include +#include #include struct proc; @@ -48,6 +49,8 @@ struct filedesc { struct filedesc *fd_alloc(struct proc *td); struct filedesc *fd_from_fdnum(const struct proc *td, int fdno); void fd_close_fdnum(struct proc *td, int fdno); +ssize_t write(int fd, const void *buf, size_t count); +uint64_t sys_write(struct syscall_args *args); #endif #endif diff --git a/sys/include/sys/syscall.h b/sys/include/sys/syscall.h index b78e2ad..e75b193 100644 --- a/sys/include/sys/syscall.h +++ b/sys/include/sys/syscall.h @@ -38,6 +38,7 @@ /* Do not reorder */ enum { SYS_exit = 1, + SYS_write, __MAX_SYSCALLS }; -- cgit v1.2.3