some coverity fixes.
[minix.git] / lib / libc / sys-minix / write.c
blobce5d844dc45055a0346b9ded3c236fa6f9f21743
1 #include <sys/cdefs.h>
2 #include <lib.h>
3 #include "namespace.h"
5 #include <unistd.h>
7 #ifdef __weak_alias
8 __weak_alias(write, _write)
9 #endif
11 ssize_t write(int fd, const void *buffer, size_t nbytes)
13 message m;
15 m.m1_i1 = fd;
16 m.m1_i2 = nbytes;
17 m.m1_p1 = (char *) __UNCONST(buffer);
18 return(_syscall(VFS_PROC_NR, WRITE, &m));