1LLSEEK(2) Linux Programmer's Manual LLSEEK(2)
2
3
4
6 _llseek - reposition read/write file offset
7
9 #include <sys/types.h>
10 #include <unistd.h>
11
12 int _llseek(unsigned int fd, unsigned long offset_high,
13 unsigned long offset_low, loff_t *result,
14 unsigned int whence);
15
16 Note: There is no glibc wrapper for this system call; see NOTES.
17
19 The _llseek() system call repositions the offset of the open file
20 description associated with the file descriptor fd to (offset_high<<32)
21 | offset_low bytes relative to the beginning of the file, the current
22 file offset, or the end of the file, depending on whether whence is
23 SEEK_SET, SEEK_CUR, or SEEK_END, respectively. It returns the resultā
24 ing file position in the argument result.
25
26 This system call exists on various 32-bit platforms to support seeking
27 to large file offsets.
28
30 Upon successful completion, _llseek() returns 0. Otherwise, a value of
31 -1 is returned and errno is set to indicate the error.
32
34 EBADF fd is not an open file descriptor.
35
36 EFAULT Problem with copying results to user space.
37
38 EINVAL whence is invalid.
39
41 This function is Linux-specific, and should not be used in programs
42 intended to be portable.
43
45 Glibc does not provide a wrapper for this system call. To invoke it
46 directly, use syscall(2). However, you probably want to use the
47 lseek(2) wrapper function instead.
48
50 lseek(2), open(2), lseek64(3)
51
53 This page is part of release 5.02 of the Linux man-pages project. A
54 description of the project, information about reporting bugs, and the
55 latest version of this page, can be found at
56 https://www.kernel.org/doc/man-pages/.
57
58
59
60Linux 2017-09-15 LLSEEK(2)