2018-05-02 06:20:06 +03:00
|
|
|
#include <unistd.h>
|
2018-12-11 03:42:21 +03:00
|
|
|
#include <errno.h>
|
2018-05-02 06:20:06 +03:00
|
|
|
#include <syscall.h>
|
2018-12-10 04:09:27 +03:00
|
|
|
#include <syscall_nums.h>
|
2018-05-02 06:20:06 +03:00
|
|
|
|
2021-05-31 04:47:02 +03:00
|
|
|
DEFN_SYSCALL3(write, SYS_WRITE, int, char *, size_t);
|
2018-05-02 06:20:06 +03:00
|
|
|
|
|
|
|
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));
|
2018-05-02 06:20:06 +03:00
|
|
|
}
|