Seth Woolley's Man Viewer

llseek(2) - _llseek, _llseek - reposition read/write file offset - man 2 llseek

([section] manual, -k keyword, -K [section] search, -f whatis)
man plain no title

LLSEEK(2)                  Linux Programmer's Manual                 LLSEEK(2)



NAME
       _llseek - reposition read(2,n,1 builtins)/write(1,2) file(1,n) offset

SYNOPSIS
       #include <unistd.h>

       #include <linux/unistd.h>

       _syscall5(int,  _llseek, uint, fd, ulong, hi, ulong, lo, loff_t *, res,
       uint, wh);

       int _llseek(unsigned int fd, unsigned long offset_high,  unsigned  long
       offset_low, loff_t *result, unsigned int whence);

DESCRIPTION
       The  _llseek  function repositions the offset of the file(1,n) descriptor fd
       to (offset_high<<32) | offset_low bytes relative to  the  beginning  of
       the  file(1,n),  the  current  position in(1,8) the file(1,n), or the end of the file(1,n),
       depending on whether whence is SEEK_SET, SEEK_CUR, or SEEK_END, respec-
       tively.  It returns the resulting file(1,n) position in(1,8) the argument result.


RETURN VALUE
       Upon successful completion, _llseek returns 0. Otherwise, a value of -1
       is returned and errno is set(7,n,1 builtins) to indicate the error.

ERRORS
       EBADF  fd is not an open(2,3,n) file(1,n) descriptor.

       EFAULT Problem with copying results to user space.

       EINVAL whence is invalid.

CONFORMING TO
       This  function  is  Linux-specific,  and should not be used in(1,8) programs
       intended to be portable.

SEE ALSO
       lseek(2)



Linux 1.2.9                       1995-06-10                         LLSEEK(2)

References for this manual (incoming links)