1LLSEEK(2)                  Linux Programmer's Manual                 LLSEEK(2)
2
3
4

NAME

6       _llseek - reposition read/write file offset
7

SYNOPSIS

9       #include <unistd.h>
10
11       #include <sys/types.h>
12
13       #include <linux/unistd.h>
14
15       #include <errno.h>
16
17       _syscall5(int, _llseek, unsigned int, fd, unsigned long, hi,
18                 unsigned long, lo, loff_t *, res, unsigned int, wh)
19                /* Using syscall(2) may be preferable; see intro(2) */
20
21       int _llseek(unsigned int fd, unsigned long offset_high,
22                   unsigned long offset_low, loff_t *result,
23                   unsigned int whence);
24

DESCRIPTION

26       The  _llseek() function repositions the offset of the open file associ‐
27       ated with the file descriptor  fd  to  (offset_high<<32)  |  offset_low
28       bytes  relative  to  the beginning of the file, the current position in
29       the file, or the end of  the  file,  depending  on  whether  whence  is
30       SEEK_SET,  SEEK_CUR, or SEEK_END, respectively.  It returns the result‐
31       ing file position in the argument result.
32
33

RETURN VALUE

35       Upon successful completion, _llseek() returns 0. Otherwise, a value  of
36       -1 is returned and errno is set to indicate the error.
37

ERRORS

39       EBADF  fd is not an open file descriptor.
40
41       EFAULT Problem with copying results to user space.
42
43       EINVAL whence is invalid.
44

CONFORMING TO

46       This  function  is  Linux  specific, and should not be used in programs
47       intended to be portable.
48

SEE ALSO

50       lseek(2), lseek64(3)
51
52
53
54Linux 1.2.9                       1995-06-10                         LLSEEK(2)
Impressum