retire BIOS_SEG and umap_bios
[minix3.git] / lib / libc / sys-minix / lseek64.c
blob1310cba5fc21656c722f2290cea4cf2f27de089d
1 #include <sys/cdefs.h>
2 #include "namespace.h"
3 #include <lib.h>
5 #include <unistd.h>
6 #include <minix/u64.h>
8 int lseek64(fd, offset, whence, newpos)
9 int fd;
10 u64_t offset;
11 int whence;
12 u64_t *newpos;
14 message m;
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;