1 .\" Copyright (C) 1995 Andries Brouwer (aeb@cwi.nl)
2 .\" Written 10 June 1995 by Andries Brouwer <aeb@cwi.nl>
3 .\" and Copyright (C) 2007, 2015, 2020, Michael Kerrisk <mtk.manpages@gmail.com>
5 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
7 .\" Modified Thu Oct 31 15:16:23 1996 by Eric S. Raymond <esr@thyrsus.com>
9 .TH LLSEEK 2 2022-09-09 "Linux man-pages (unreleased)"
11 _llseek \- reposition read/write file offset
14 .RI ( libc ", " \-lc )
17 .BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
18 .B #include <unistd.h>
20 .BI "int syscall(SYS__llseek, unsigned int " fd ", unsigned long " offset_high ,
21 .BI " unsigned long " offset_low ", loff_t *" result ,
22 .BI " unsigned int " whence );
26 glibc provides no wrapper for
28 necessitating the use of
31 Note: for information about the
38 system call repositions the offset of the open file description associated
39 with the file descriptor
43 (offset_high << 32) | offset_low
45 This new offset is a byte offset
46 relative to the beginning of the file, the current file offset,
47 or the end of the file, depending on whether
56 The new file offset is returned in the argument
60 is a 64-bit signed type.
62 This system call exists on various 32-bit platforms to support
63 seeking to large file offsets.
65 Upon successful completion,
68 Otherwise, a value of \-1 is returned and
70 is set to indicate the error.
75 is not an open file descriptor.
78 Problem with copying results to user space.
84 This function is Linux-specific, and should not be used in programs
85 intended to be portable.
87 You probably want to use the
89 wrapper function instead.