toaruos/libc/unistd/write.c

11 lines
248 B
C
Raw Normal View History

#include <unistd.h>
2018-12-11 03:42:21 +03:00
#include <errno.h>
#include <syscall.h>
#include <syscall_nums.h>
DEFN_SYSCALL3(write, SYS_WRITE, int, char *, int);
ssize_t write(int file, const void *ptr, size_t len) {
2018-12-11 03:42:21 +03:00
__sets_errno(syscall_write(file,(char *)ptr,len));
}