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
/
lseek.c
blob
fbcfb09aab7848a6d4d396a1bb456325a29d8f74
1
#include <sys/cdefs.h>
2
#include
"namespace.h"
3
#include <lib.h>
4
5
#include <unistd.h>
6
7
#ifdef __weak_alias
8
__weak_alias
(
lseek
,
_lseek
)
9
#endif
10
11
off_t
lseek
(
fd
,
offset
,
whence
)
12
int
fd
;
13
off_t offset
;
14
int
whence
;
15
{
16
message m
;
17
18
m
.
m2_i1
=
fd
;
19
m
.
m2_l1
=
offset
;
20
m
.
m2_i2
=
whence
;
21
if
(
_syscall
(
VFS_PROC_NR
,
LSEEK
, &
m
) <
0
)
return
( (
off_t
) -
1
);
22
return
( (
off_t
)
m
.
m2_l1
);
23
}