repo.or.cz
/
minix3.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
. service tells you which device it couldn't stat
[minix3.git]
/
lib
/
other
/
_lseek64.c
blob
e4aa9c506fc8d66908a23fd928f3bbc801fc3ba6
1
#include <lib.h>
2
#define lseek64 _lseek64
3
#include <unistd.h>
4
#include <minix/u64.h>
5
6
PUBLIC
int
lseek64
(
fd
,
offset
,
whence
,
newpos
)
7
int
fd
;
8
u64_t offset
;
9
int
whence
;
10
u64_t
*
newpos
;
11
{
12
message m
;
13
14
m
.
m2_i1
=
fd
;
15
m
.
m2_l1
=
ex64lo
(
offset
);
16
m
.
m2_l2
=
ex64hi
(
offset
);
17
m
.
m2_i2
=
whence
;
18
if
(
_syscall
(
FS
,
LLSEEK
, &
m
) <
0
)
return
-
1
;
19
if
(
newpos
)
20
*
newpos
=
make64
(
m
.
m2_l2
,
m
.
m2_l1
);
21
return
0
;
22
}