1_llseek(2)                    System Calls Manual                   _llseek(2)
2
3
4

NAME

6       _llseek - reposition read/write file offset
7

LIBRARY

9       Standard C library (libc, -lc)
10

SYNOPSIS

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

DESCRIPTION

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

RETURN VALUE

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

ERRORS

46       EBADF  fd is not an open file descriptor.
47
48       EFAULT Problem with copying results to user space.
49
50       EINVAL whence is invalid.
51

VERSIONS

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

STANDARDS

56       Linux.
57

SEE ALSO

59       lseek(2), open(2), lseek64(3)
60
61
62
63Linux man-pages 6.05              2023-03-30                        _llseek(2)
Impressum