OSDN Git Service

Update draft for LDP 3.67
[linuxjm/LDP_man-pages.git] / draft / man3 / posix_fallocate.3
index fed04b3..4572856 100644 (file)
@@ -1,5 +1,6 @@
 .\" Copyright (c) 2006, Michael Kerrisk <mtk.manpages@gmail.com>
 .\"
+.\" %%%LICENSE_START(VERBATIM)
 .\" 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.
 .\"
 .\" Formatted or processed versions of this manual, if unaccompanied by
 .\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
 .\"
 .\" Japanese Version Copyright (c) 2006 Yuichi SATO
 .\"         all rights reserved.
 .\" Translated 2006-07-13, Yuichi SATO <ysato444@yahoo.co.jp>. LDP v2.29
 .\" Updated 2010-04-11, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v3.24
 .\"
-.TH POSIX_FALLOCATE 3  2010-09-20 "GNU" "Linux Programmer's Manual"
-.\"O .SH NAME
-.SH Ì¾Á°
-.\"O posix_fallocate \- allocate file space
-posix_fallocate \- ¥Õ¥¡¥¤¥ë¤Î¥¹¥Ú¡¼¥¹¤ò³ÎÊݤ¹¤ë
-.\"O .SH SYNOPSIS
-.SH ½ñ¼°
+.TH POSIX_FALLOCATE 3 2013\-02\-12 GNU "Linux Programmer's Manual"
+.SH 名前
+posix_fallocate \- ファイルのスペースを確保する
+.SH 書式
 .nf
-.B #include <fcntl.h>
+\fB#include <fcntl.h>\fP
 .sp
-.BI "int posix_fallocate(int " fd ", off_t " offset ", off_t " len );
+\fBint posix_fallocate(int \fP\fIfd\fP\fB, off_t \fP\fIoffset\fP\fB, off_t \fP\fIlen\fP\fB);\fP
 .fi
 .sp
 .ad l
 .in -4n
-.\"O Feature Test Macro Requirements for glibc (see
-.\"O .BR feature_test_macros (7)):
-glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
-.RB ( feature_test_macros (7)
-»²¾È):
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
 .in
 .sp
-.BR posix_fallocate ():
+\fBposix_fallocate\fP():
 .RS 4
 _XOPEN_SOURCE\ >=\ 600 || _POSIX_C_SOURCE\ >=\ 200112L
 .RE
 .ad
-.\"O .SH DESCRIPTION
-.SH ÀâÌÀ
-.\"O The function
-.\"O .BR posix_fallocate ()
-.\"O ensures that disk space is allocated for the file referred to by the
-.\"O descriptor
-.\"O .I fd
-.\"O for the bytes in the range starting at
-.\"O .I offset
-.\"O and continuing for
-.\"O .I len
-.\"O bytes.
-´Ø¿ô
-.BR posix_fallocate ()
-¤Ï¡¢¥Ç¥£¥¹¥¯¥ê¥×¥¿
-.I fd
-¤Ç»²¾È¤µ¤ì¤ë¥Õ¥¡¥¤¥ë¤ËÂФ·¤Æ¡¢¥Ç¥£¥¹¥¯¥¹¥Ú¡¼¥¹¤ò³Î¼Â¤Ë³ÎÊݤ¹¤ë¡£
-¥Ç¥£¥¹¥¯¥¹¥Ú¡¼¥¹¤Ï
-.I offset
-¤«¤é»Ï¤Þ¤ë
-.I len
-¥Ð¥¤¥È¤ÎÈϰϤΥХ¤¥È¤Ç¤¢¤ë¡£
-.\"O After a successful call to
-.\"O .BR posix_fallocate (),
-.\"O subsequent writes to bytes in the specified range are
-.\"O guaranteed not to fail because of lack of disk space.
-.BR posix_fallocate ()
-¤Î¸Æ¤Ó½Ð¤·¤¬À®¸ù¤·¤¿¸å¡¢»ØÄꤵ¤ì¤¿ÈϰϤΥХ¤¥È¤ËÂФ¹¤ë½ñ¤­¹þ¤ß¤Ï¡¢
-¥Ç¥£¥¹¥¯¥¹¥Ú¡¼¥¹¤ÎÉÔ­¤Ç¼ºÇÔ¤·¤Ê¤¤¤³¤È¤¬Êݾڤµ¤ì¤ë¡£
+.SH 説明
+関数 \fBposix_fallocate\fP()  は、ディスクリプタ \fIfd\fP で参照されるファイルに対して、ディスクスペースを確実に確保する。
+ディスクスペースは \fIoffset\fP から始まる \fIlen\fP バイトの範囲のバイトである。 \fBposix_fallocate\fP()
+の呼び出しが成功した後、指定された範囲のバイトに対する書き込みは、 ディスクスペースの不足で失敗しないことが保証される。
 
-.\"O If the size of the file is less than
-.\"O .IR offset + len ,
-.\"O then the file is increased to this size;
-.\"O otherwise the file size is left unchanged.
-¥Õ¥¡¥¤¥ë¤Î¥µ¥¤¥º¤¬
-.IR offset + len
-¤è¤ê¾®¤µ¤¤¾ì¹ç¡¢¥Õ¥¡¥¤¥ë¤Ï¤³¤Î¥µ¥¤¥º¤Ë¤Ê¤ë¤è¤¦¤Ë³ÈÂ礵¤ì¤ë¡£
-¤½¤ì°Ê³°¤Î¾ì¹ç¡¢¥Õ¥¡¥¤¥ë¥µ¥¤¥º¤ÏÊѤï¤é¤Ê¤¤¡£
-.\"O .SH "RETURN VALUE"
-.SH ÊÖ¤êÃÍ
-.\"O .BR posix_fallocate ()
-.\"O returns zero on success, or an error number on failure.
-.BR posix_fallocate ()
-¤ÏÀ®¸ù¤·¤¿¾ì¹ç¡¢0 ¤òÊÖ¤¹¡£
-¼ºÇÔ¤·¤¿¾ì¹ç¡¢¥¨¥é¡¼ÈÖ¹æ¤òÊÖ¤¹¡£
-.\"O Note that
-.\"O .I errno
-.\"O is not set.
-.I errno
-¤¬ÀßÄꤵ¤ì¤Ê¤¤ÅÀ¤ËÃí°Õ¤¹¤ë¤³¤È¡£
-.\"O .SH "ERRORS"
-.SH ¥¨¥é¡¼
-.TP
-.B EBADF
-.\"O .I fd
-.\"O is not a valid file descriptor, or is not opened for writing.
-.I fd
-¤¬Í­¸ú¤Ê¥Ç¥£¥¹¥¯¥ê¥×¥¿¤Ç¤Ê¤¤¡£
-¤Þ¤¿¤Ï½ñ¤­¹þ¤ßÍѤ˥ª¡¼¥×¥ó¤µ¤ì¤Æ¤¤¤Ê¤¤¡£
-.TP
-.B EFBIG
-.\"O .I offset+len
-.\"O exceeds the maximum file size.
-.I offset+len
-¤¬ºÇÂç¥Õ¥¡¥¤¥ë¥µ¥¤¥º¤òĶ¤¨¤Æ¤¤¤ë¡£
-.TP
-.B EINVAL
-.\"O .I offset
-.\"O was less than 0, or
-.\"O .I len
-.\"O was less than or equal to 0.
-.I offset
-¤¬ 0 Ì¤Ëþ¤À¤Ã¤¿¤«¡¢
-.I len
-¤¬ 0 °Ê²¼¤À¤Ã¤¿¡£
-.TP
-.B ENODEV
-.\"O .I fd
-.\"O does not refer to a regular file.
-.I fd
-¤¬Ä̾ï¤Î¥Õ¥¡¥¤¥ë¤È¤·¤Æ»²¾È¤µ¤ì¤Æ¤¤¤Ê¤¤¡£
-.TP
-.B ENOSPC
-.\"O There is not enough space left on the device containing the file
-.\"O referred to by
-.\"O .IR fd .
-.I fd
-¤Ç»²¾È¤µ¤ì¤ë¥Õ¥¡¥¤¥ë¤¬Â¸ºß¤¹¤ë¥Ç¥Ð¥¤¥¹¤Ë¡¢½½Ê¬¤Ê¥¹¥Ú¡¼¥¹¤¬»Ä¤Ã¤Æ¤¤¤Ê¤¤¡£
-.TP
-.B ESPIPE
-.\"O .I fd
-.\"O refers to a pipe of file descriptor.
-.I fd
-¤¬¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤Î¥Ñ¥¤¥×¤ò»²¾È¤·¤Æ¤¤¤ë¡£
-.\"O .SH VERSIONS
-.SH ¥Ð¡¼¥¸¥ç¥ó
-.\"O .BR posix_fallocate ()
-.\"O is available since glibc 2.1.94.
-.BR posix_fallocate ()
-¤Ï glibc 2.1.94 °Ê¹ß¤ÇÍøÍѲÄǽ¤Ç¤¢¤ë¡£
-.\"O .SH "CONFORMING TO"
-.SH ½àµò
-POSIX.1-2001.
+ファイルのサイズが \fIoffset\fP+\fIlen\fP より小さい場合、ファイルはこのサイズになるように拡大される。
+それ以外の場合、ファイルサイズは変わらない。
+.SH 返り値
+\fBposix_fallocate\fP()  は成功した場合、0 を返す。 失敗した場合、エラー番号を返す。 \fIerrno\fP
+が設定されない点に注意すること。
+.SH エラー
+.TP 
+\fBEBADF\fP
+\fIfd\fP が有効なファイルディスクリプタでないか、 書き込み用としてオープンされていない。
+.TP 
+\fBEFBIG\fP
+\fIoffset+len\fP が最大ファイルサイズを超えている。
+.TP 
+\fBEINVAL\fP
+\fIoffset\fP が 0 未満だったか、 \fIlen\fP が 0 以下だった。
+.TP 
+\fBENODEV\fP
+\fIfd\fP が通常のファイルとして参照されていない。
+.TP 
+\fBENOSPC\fP
+\fIfd\fP が参照するファイルを含むデバイスに十分な空き領域がない。
+.TP 
+\fBESPIPE\fP
+\fIfd\fP がパイプを参照している。
+.SH バージョン
+\fBposix_fallocate\fP()  は glibc 2.1.94 以降で利用可能である。
+.SH 準拠
+POSIX.1\-2001.
 
-.\"O POSIX.1-2008 says that an implementation
-.\"O .I shall
-.\"O give the
-.\"O .B EINVAL
-.\"O error if
-.\"O .I len
-.\"O was 0, or
-.\"O .I offset
-.\"O was less than 0.
-POSIX.1-2008 ¤Ç¤Ï¡¢
-.I len
-¤¬ 0 ¤Î¾ì¹ç¡¢¤â¤·¤¯¤Ï
-.I offset
-¤¬ 0 Ì¤Ëþ¤Î¾ì¹ç¡¢
-.B EINVAL
-¥¨¥é¡¼¤òÊÖ¤¹¤â¤Î¤È¤µ¤ì¤Æ¤¤¤ë¡£
-.\"O POSIX.1-2001 says that an implementation
-.\"O .I shall
-.\"O give the
-.\"O .B EINVAL
-.\"O error if
-.\"O .I len
-.\"O is less than 0, or
-.\"O .I offset
-.\"O was less than 0, and
-.\"O .I may
-.\"O give the error if
-.\"O .I len
-.\"O equals zero.
-POSIX.1-2001 ¤Ç¤Ï¡¢
-.I len
-¤¬ 0 Ì¤Ëþ¤Î¾ì¹ç¡¢¤â¤·¤¯¤Ï
-.I offset
-¤¬ 0 Ì¤Ëþ¤Î¾ì¹ç¡¢
-.B EINVAL
-¥¨¥é¡¼¤òÊÖ¤¹¤â¤Î¤È¤µ¤ì¤Æ¤¤¤ë¡£¤Þ¤¿¡¢
-.I len
-¤¬ 0 ¤Î¾ì¹ç¡¢
-.B EINVAL
-¥¨¥é¡¼¤òÊÖ¤·¤Æ¤â¤è¤¤¤È¤µ¤ì¤Æ¤¤¤ë¡£
-.\"O .SH "SEE ALSO"
-.SH ´ØÏ¢¹àÌÜ
-.BR fallocate (2),
-.BR lseek (2),
-.BR posix_fadvise (2)
+POSIX.1\-2008 では、 \fIlen\fP が 0 の場合、もしくは \fIoffset\fP が 0 未満の場合、 \fBEINVAL\fP
+エラーを返すものとされている。 POSIX.1\-2001 では、 \fIlen\fP が 0 未満の場合、もしくは \fIoffset\fP が 0 未満の場合、
+\fBEINVAL\fP エラーを返すものとされている。また、 \fIlen\fP が 0 の場合、 \fBEINVAL\fP エラーを返してもよいとされている。
+.SH 関連項目
+\fBfallocate\fP(1), \fBfallocate\fP(2), \fBlseek\fP(2), \fBposix_fadvise\fP(2)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.67 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。