2005-04-21 16:53:53 +02:00
|
|
|
#include <lib.h>
|
|
|
|
#define lseek _lseek
|
|
|
|
#include <unistd.h>
|
|
|
|
|
|
|
|
PUBLIC off_t lseek(fd, offset, whence)
|
|
|
|
int fd;
|
|
|
|
off_t offset;
|
|
|
|
int whence;
|
|
|
|
{
|
|
|
|
message m;
|
|
|
|
|
|
|
|
m.m2_i1 = fd;
|
|
|
|
m.m2_l1 = offset;
|
|
|
|
m.m2_i2 = whence;
|
2010-06-08 15:58:01 +02:00
|
|
|
if (_syscall(VFS_PROC_NR, LSEEK, &m) < 0) return( (off_t) -1);
|
2005-04-21 16:53:53 +02:00
|
|
|
return( (off_t) m.m2_l1);
|
|
|
|
}
|