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
/
read.c
blob
b14391203bed3f633c0464f65bf6ddb6dfc9e41f
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
(
read
,
_read
)
9
#endif
10
11
ssize_t
read
(
int
fd
,
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
*)
buffer
;
18
return
(
_syscall
(
VFS_PROC_NR
,
READ
, &
m
));
19
}