. service tells you which device it couldn't stat
[minix3.git] / lib / other / _lseek64.c
blobe4aa9c506fc8d66908a23fd928f3bbc801fc3ba6
1 #include <lib.h>
2 #define lseek64 _lseek64
3 #include <unistd.h>
4 #include <minix/u64.h>
6 PUBLIC int lseek64(fd, offset, whence, newpos)
7 int fd;
8 u64_t offset;
9 int whence;
10 u64_t *newpos;
12 message m;
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;