.\" Copyright (C) 1995 Andries Brouwer (aeb@cwi.nl) .\" .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" .\" Written 10 June 1995 by Andries Brouwer .\" Modified Thu Oct 31 15:16:23 1996 by Eric S. Raymond .\" .\" Japanese Version Copyright (c) 1997 HANATAKA Shinya .\" all rights reserved. .\" Translated Sun Feb 23 16:22:27 JST 1997 .\" by HANATAKA Shinya .\" Updated & Modified Sat Jun 2 18:27:49 JST 2001 .\" by Yuichi SATO .\" Updated & Modified Sat Sep 6 17:05:03 JST 2003 .\" by Yuichi SATO .\" Updated & Modified Fri Dec 31 00:50:01 JST 2004 by Yuichi SATO .\" .\"WORD: offset オフセット .\"WORD: descriptor ディスクリプター .\"WORD: argument 引き数 .\"WORD: open オープン .\"WORD: support サポート .\" .TH LLSEEK 2 2007-06-01 "Linux" "Linux Programmer's Manual" .\"O .SH NAME .SH 名前 .\"O _llseek \- reposition read/write file offset _llseek \- ファイルの読み書きオフセットの位置を変える .\"O .SH SYNOPSIS .SH 書式 .nf .B #include .B #include .sp .BI "int _llseek(unsigned int " fd ", unsigned long " offset_high , .BI " unsigned long " offset_low ", loff_t *" result , .BI " unsigned int " whence ); .fi .\"O .SH DESCRIPTION .SH 説明 .\"O The .\"O .BR _llseek () .\"O function repositions the offset of the open file associated .\"O with the file descriptor .\"O .I fd .\"O to .\"O .I (offset_high<<32) | offset_low .\"O bytes relative to the beginning of the file, the current position in the file, .\"O or the end of the file, depending on whether .\"O .I whence .\"O is .\"O .BR SEEK_SET , .\"O .BR SEEK_CUR , .\"O or .\"O .BR SEEK_END , .\"O respectively. .\"O It returns the resulting file position in the argument .\"O .IR result . .BR _llseek () 関数は、ファイル・ディスクリプター (descriptor) .I fd に関連づけられたオープンされたファイルのオフセットの位置を、相対的に .I (offset_high<<32) | offset_low バイトだけ変更する。 基準となる位置を表す .I whence には .BR SEEK_SET , .BR SEEK_CUR , .B SEEK_END のいずれかを指定し、それぞれ ファイルの先頭、ファイルの現在位置、 ファイルの最後を表す。 結果のファイル位置を .I result 引き数に返す。 .\"O .SH "RETURN VALUE" .SH 返り値 .\"O Upon successful completion, .\"O .BR _llseek () .\"O returns 0. .\"O Otherwise, a value of \-1 is returned and .\"O .I errno .\"O is set to indicate the error. 成功した場合は、 .BR _llseek () は 0 を返す。 そうでなれば \-1 という値が返り、エラーを示す .I errno が設定される。 .\"O .SH ERRORS .SH エラー .TP .B EBADF .\"O .I fd .\"O is not an open file descriptor. .I fd がオープンされたファイル・ディスクリプターでない。 .TP .B EFAULT .\"O Problem with copying results to user space. 結果をユーザ空間にコピーするときに問題があった。 .TP .B EINVAL .\"O .I whence .\"O is invalid. .I whence が不正である。 .\"O .SH "CONFORMING TO" .SH 準拠 .\"O This function is Linux-specific, and should not be used in programs .\"O intended to be portable. この関数は Linux 特有であり、移植性の必要なプログラムでは使用してはいけない。 .\"O .SH NOTES .SH 注意 .\"O Glibc does not provide a wrapper for this system call; call it using .\"O .BR syscall (2). glibc はこのシステムコールに対するラッパー関数を提供していない。 .BR syscall (2) を使って呼び出すこと。 .\"O .SH "SEE ALSO" .SH 関連項目 .BR lseek (2), .BR lseek64 (3)