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

NAME

6       _llseek - reposition read/write file offset
7

SYNOPSIS

9       #include <sys/syscall.h>      /* Definition of SYS_* constants */
10       #include <unistd.h>
11
12       int syscall(SYS__llseek, unsigned int fd, unsigned long offset_high,
13                   unsigned long offset_low, loff_t *result,
14                   unsigned int whence);
15
16       Note: glibc provides no wrapper for _llseek(), necessitating the use of
17       syscall(2).
18

DESCRIPTION

20       Note:  for  information  about  the  llseek(3)  library  function,  see
21       lseek64(3).
22
23       The  _llseek()  system call repositions the offset of the open file de‐
24       scription associated with the file descriptor fd to the value
25
26              (offset_high << 32) | offset_low
27
28       This new offset is a byte offset relative to the beginning of the file,
29       the  current  file offset, or the end of the file, depending on whether
30       whence is SEEK_SET, SEEK_CUR, or SEEK_END, respectively.
31
32       The new file offset is returned in  the  argument  result.   The   type
33       loff_t is a 64-bit signed type.
34
35       This  system call exists on various 32-bit platforms to support seeking
36       to large file offsets.
37

RETURN VALUE

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

ERRORS

43       EBADF  fd is not an open file descriptor.
44
45       EFAULT Problem with copying results to user space.
46
47       EINVAL whence is invalid.
48

CONFORMING TO

50       This function is Linux-specific, and should not be used in programs in‐
51       tended to be portable.
52

NOTES

54       You probably want to use the lseek(2) wrapper function instead.
55

SEE ALSO

57       lseek(2), open(2), lseek64(3)
58

COLOPHON

60       This page is part of release 5.13 of the Linux  man-pages  project.   A
61       description  of  the project, information about reporting bugs, and the
62       latest    version    of    this    page,    can     be     found     at
63       https://www.kernel.org/doc/man-pages/.
64
65
66
67Linux                             2021-03-22                         LLSEEK(2)
Impressum