repo.or.cz
/
minix.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
some coverity fixes.
[minix.git]
/
lib
/
libc
/
sys-minix
/
write.c
blob
ce5d844dc45055a0346b9ded3c236fa6f9f21743
1
#include <sys/cdefs.h>
2
#include <lib.h>
3
#include
"namespace.h"
4
5
#include <unistd.h>
6
7
#ifdef __weak_alias
8
__weak_alias
(
write
,
_write
)
9
#endif
10
11
ssize_t
write
(
int
fd
,
const void
*
buffer
,
size_t
nbytes
)
12
{
13
message m
;
14
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
));
19
}
20