_llseek - ファイルの読み書きオフセットの位置を変える
#include <sys/types.h>
#include <unistd.h>
int _llseek(unsigned int fd, unsigned long offset_high,
unsigned long offset_low, loff_t *result,
unsigned int whence);
注: このシステムコールには glibc のラッパー関数は存在しない。「注意」の節を参照。
Note: for information about the llseek(3) library function, see lseek64(3).
The _llseek() system call repositions the offset of the open file description associated with the file descriptor fd to the value
(offset_high << 32) | offset_low
This new offset is a byte offset relative to the beginning of the file, the current file offset, or the end of the file, depending on whether whence is SEEK_SET, SEEK_CUR, or SEEK_END, respectively.
The new file offset is returned in the argument result. The type loff_t is a 64-bit signed type.
This system call exists on various 32-bit platforms to support seeking to large file offsets.
成功した場合は、 _llseek() は 0 を返す。 そうでなれば -1 という値が返り、エラーを示す errno が設定される。
EBADF |
fd がオープンされたファイルディスクリプターでない。 |
||
EFAULT |
結果をユーザー空間にコピーするときに問題があった。 |
||
EINVAL |
whence が不正である。 |
この関数は Linux 特有であり、移植性の必要なプログラムでは使用してはいけない。
Glibc does not provide a wrapper for this system call. To invoke it directly, use syscall(2). However, you probably want to use the lseek(2) wrapper function instead.
この man ページは Linux man-pages プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は https://www.kernel.org/doc/man-pages/ に書かれている。