OSDN Git Service

37b9d2d46fa841bd431ea6d92f7c755553869b96
[linuxjm/LDP_man-pages.git] / draft / man2 / llseek.2
1 .\" Copyright (C) 1995 Andries Brouwer (aeb@cwi.nl)
2 .\"
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
6 .\"
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
11 .\"
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein.  The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
18 .\" professionally.
19 .\"
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
22 .\"
23 .\" Written 10 June 1995 by Andries Brouwer <aeb@cwi.nl>
24 .\" Modified Thu Oct 31 15:16:23 1996 by Eric S. Raymond <esr@thyrsus.com>
25 .\"
26 .\" Japanese Version Copyright (c) 1997 HANATAKA Shinya
27 .\"         all rights reserved.
28 .\" Translated Sun Feb 23 16:22:27 JST 1997
29 .\"         by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
30 .\" Updated & Modified Sat Jun  2 18:27:49 JST 2001
31 .\"         by Yuichi SATO <ysato@h4.dion.ne.jp>
32 .\" Updated & Modified Sat Sep  6 17:05:03 JST 2003
33 .\"         by Yuichi SATO <ysato444@yahoo.co.jp>
34 .\" Updated & Modified Fri Dec 31 00:50:01 JST 2004 by Yuichi SATO
35 .\"
36 .\"WORD:        offset                  オフセット
37 .\"WORD:        descriptor              ディスクリプター
38 .\"WORD:        argument                引き数
39 .\"WORD:        open                    オープン
40 .\"WORD:        support                 サポート
41 .\"
42 .TH LLSEEK 2 2007-06-01 "Linux" "Linux Programmer's Manual"
43 .\"O .SH NAME
44 .SH 名前
45 .\"O _llseek \- reposition read/write file offset
46 _llseek \- ファイルの読み書きオフセットの位置を変える
47 .\"O .SH SYNOPSIS
48 .SH 書式
49 .nf
50 .B #include <sys/types.h>
51 .B #include <unistd.h>
52 .sp
53 .BI "int _llseek(unsigned int " fd ", unsigned long " offset_high ,
54 .BI "            unsigned long " offset_low ", loff_t *" result ,
55 .BI "            unsigned int " whence );
56 .fi
57 .\"O .SH DESCRIPTION
58 .SH 説明
59 .\"O The
60 .\"O .BR _llseek ()
61 .\"O function repositions the offset of the open file associated
62 .\"O with the file descriptor
63 .\"O .I fd
64 .\"O to
65 .\"O .I (offset_high<<32) | offset_low
66 .\"O bytes relative to the beginning of the file, the current position in the file,
67 .\"O or the end of the file, depending on whether
68 .\"O .I  whence
69 .\"O is
70 .\"O .BR SEEK_SET ,
71 .\"O .BR SEEK_CUR ,
72 .\"O or
73 .\"O .BR SEEK_END ,
74 .\"O respectively.
75 .\"O It returns the resulting file position in the argument
76 .\"O .IR result .
77 .BR _llseek ()
78 関数は、ファイル・ディスクリプター (descriptor)
79 .I fd
80 に関連づけられたオープンされたファイルのオフセットの位置を、相対的に
81 .I (offset_high<<32) | offset_low
82 バイトだけ変更する。
83 基準となる位置を表す
84 .I  whence
85 には
86 .BR SEEK_SET ,
87 .BR SEEK_CUR ,
88 .B SEEK_END
89 のいずれかを指定し、それぞれ
90 ファイルの先頭、ファイルの現在位置、
91 ファイルの最後を表す。
92 結果のファイル位置を
93 .I result
94 引き数に返す。
95 .\"O .SH "RETURN VALUE"
96 .SH 返り値
97 .\"O Upon successful completion,
98 .\"O .BR _llseek ()
99 .\"O returns 0.
100 .\"O Otherwise, a value of \-1 is returned and
101 .\"O .I errno
102 .\"O is set to indicate the error.
103 成功した場合は、
104 .BR _llseek ()
105 は 0 を返す。
106 そうでなれば \-1 という値が返り、エラーを示す
107 .I errno
108 が設定される。
109 .\"O .SH ERRORS
110 .SH エラー
111 .TP
112 .B EBADF
113 .\"O .I fd
114 .\"O is not an open file descriptor.
115 .I fd
116 がオープンされたファイル・ディスクリプターでない。
117 .TP
118 .B EFAULT
119 .\"O Problem with copying results to user space.
120 結果をユーザ空間にコピーするときに問題があった。
121 .TP
122 .B EINVAL
123 .\"O .I whence
124 .\"O is invalid.
125 .I whence
126 が不正である。
127 .\"O .SH "CONFORMING TO"
128 .SH 準拠
129 .\"O This function is Linux-specific, and should not be used in programs
130 .\"O intended to be portable.
131 この関数は Linux 特有であり、移植性の必要なプログラムでは使用してはいけない。
132 .\"O .SH NOTES
133 .SH 注意
134 .\"O Glibc does not provide a wrapper for this system call; call it using
135 .\"O .BR syscall (2).
136 glibc はこのシステムコールに対するラッパー関数を提供していない。
137 .BR syscall (2)
138 を使って呼び出すこと。
139 .\"O .SH "SEE ALSO"
140 .SH 関連項目
141 .BR lseek (2),
142 .BR lseek64 (3)