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 Note: for information about the llseek(3) library function, see
20 lseek64(3).
21
22 The _llseek() system call repositions the offset of the open file de‐
23 scription associated with the file descriptor fd to the value
24
25 (offset_high << 32) | offset_low
26
27 This new offset is a byte offset relative to the beginning of the file,
28 the current file offset, or the end of the file, depending on whether
29 whence is SEEK_SET, SEEK_CUR, or SEEK_END, respectively.
30
31 The new file offset is returned in the argument result. The type
32 loff_t is a 64-bit signed type.
33
34 This system call exists on various 32-bit platforms to support seeking
35 to large file offsets.
36
38 Upon successful completion, _llseek() returns 0. Otherwise, a value of
39 -1 is returned and errno is set to indicate the error.
40
42 EBADF fd is not an open file descriptor.
43
44 EFAULT Problem with copying results to user space.
45
46 EINVAL whence is invalid.
47
49 This function is Linux-specific, and should not be used in programs in‐
50 tended to be portable.
51
53 Glibc does not provide a wrapper for this system call. To invoke it
54 directly, use syscall(2). However, you probably want to use the
55 lseek(2) wrapper function instead.
56
58 lseek(2), open(2), lseek64(3)
59
61 This page is part of release 5.10 of the Linux man-pages project. A
62 description of the project, information about reporting bugs, and the
63 latest version of this page, can be found at
64 https://www.kernel.org/doc/man-pages/.
65
66
67
68Linux 2020-12-21 LLSEEK(2)