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
/
lseek64.c
blob
1310cba5fc21656c722f2290cea4cf2f27de089d
1
#include <sys/cdefs.h>
2
#include
"namespace.h"
3
#include <lib.h>
4
5
#include <unistd.h>
6
#include <minix/u64.h>
7
8
int
lseek64
(
fd
,
offset
,
whence
,
newpos
)
9
int
fd
;
10
u64_t offset
;
11
int
whence
;
12
u64_t
*
newpos
;
13
{
14
message m
;
15
16
m
.
m2_i1
=
fd
;
17
m
.
m2_l1
=
ex64lo
(
offset
);
18
m
.
m2_l2
=
ex64hi
(
offset
);
19
m
.
m2_i2
=
whence
;
20
if
(
_syscall
(
VFS_PROC_NR
,
LLSEEK
, &
m
) <
0
)
return
-
1
;
21
if
(
newpos
)
22
*
newpos
=
make64
(
m
.
m2_l1
,
m
.
m2_l2
);
23
return
0
;
24
}