OSDN Git Service

(split) LDP: draft snapshot generated from latest ja.po files.
[linuxjm/LDP_man-pages.git] / draft / man2 / statfs.2
index 22824b3..b442035 100644 (file)
 .\" Modified 2003-08-17 by Walter Harms
 .\" Modified 2004-06-23 by Michael Kerrisk <mtk.manpages@gmail.com>
 .\"
-.\" Japanese Version Copyright (c) 1997 HANATAKA Shinya
-.\"         all rights reserved.
-.\" Translated Fri Dec 12 00:25:54 JST 1997
-.\"         by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
-.\" Updated & Modified Sat Jun  2 20:25:46 JST 2001
-.\"         by Yuichi SATO <ysato@h4.dion.ne.jp>
-.\" Updated & Modified Sat Jan 18 16:48:08 JST 2003
-.\"         by Yuichi SATO <ysato444@yahoo.co.jp>
-.\" Updated & Modified Sun Sep  7 00:52:44 JST 2003 by Yuichi SATO
-.\" Updated & Modified Sun Jan  9 22:35:28 JST 2005 by Yuichi SATO
-.\" Updated 2006-07-21, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.36
+.\"*******************************************************************
 .\"
-.\"WORD:       file system             ファイル・システム
-.\"WORD:       mount                   マウント
-.\"WORD:       pointer                 ポインター
-.\"WORD:       descriptor              ディスクリプター
-.\"WORD:       open                    オープン
-.\"WORD:       symbolic link           シンボリック・リンク
-.\"WORD:       open                    オープン
+.\" This file was generated with po4a. Translate the source file.
 .\"
-.TH STATFS 2 2010-09-04 "Linux" "Linux Programmer's Manual"
-.\"O .SH NAME
+.\"*******************************************************************
+.TH STATFS 2 2010\-11\-21 Linux "Linux Programmer's Manual"
 .SH 名前
-.\"O statfs, fstatfs \- get file system statistics
-statfs, fstatfs \- ファイル・システムの統計を得る
-.\"O .SH SYNOPSIS
+statfs, fstatfs \- ファイルシステムの統計を取得する
 .SH 書式
-.\"O .BR "#include <sys/vfs.h>    " "/* or <sys/statfs.h> */"
-.BR "#include <sys/vfs.h>    " "/* または <sys/statfs.h> */"
+\fB#include <sys/vfs.h> \fP/* または <sys/statfs.h> */
 .sp
-.BI "int statfs(const char *" path ", struct statfs *" buf );
+\fBint statfs(const char *\fP\fIpath\fP\fB, struct statfs *\fP\fIbuf\fP\fB);\fP
 .br
-.BI "int fstatfs(int " fd ", struct statfs *" buf );
-.\"O .SH DESCRIPTION
-.SH 書式
-.\"O The function
-.\"O .BR statfs ()
-.\"O returns information about a mounted file system.
-関数
-.BR statfs ()
-はマウントされたファイル・システムについての情報を返す。
-.\"O .I path
-.\"O is the pathname of any file within the mounted file system.
-.I path
-はマウントされたファイル・システムにあるファイルのパス名である。
-.\"O .I buf
-.\"O is a pointer to a
-.\"O .I statfs
-.\"O structure defined approximately as follows:
-.I buf
-は
-.I statfs
+\fBint fstatfs(int \fP\fIfd\fP\fB, struct statfs *\fP\fIbuf\fP\fB);\fP
+.SH 説明
+関数 \fBstatfs\fP()  はマウントされたファイルシステムについての情報を返す。 \fIpath\fP
+はマウントされたファイルシステムにあるファイルのパス名である。 \fIbuf\fP は \fIstatfs\fP
 構造体へのポインターで、およそ以下のように定義される:
 
 .in +4n
 .nf
-.\"O #if __WORDSIZE == 32              /* System word size */
 #if __WORDSIZE == 32           /* システムのワードサイズ */
 # define __SWORD_TYPE           int
 #else /* __WORDSIZE == 64 */
@@ -87,18 +51,6 @@ statfs, fstatfs \- ファイル・システムの統計を得る
 #endif
 
 struct statfs {
-.\"O     __SWORD_TYPE f_type;    /* type of file system (see below) */
-.\"O     __SWORD_TYPE f_bsize;   /* optimal transfer block size */
-.\"O     fsblkcnt_t   f_blocks;  /* total data blocks in file system */
-.\"O     fsblkcnt_t   f_bfree;   /* free blocks in fs */
-.\"O     fsblkcnt_t   f_bavail;  /* free blocks available to
-.\"O                                unprivileged user */
-.\"O     fsfilcnt_t   f_files;   /* total file nodes in file system */
-.\"O     fsfilcnt_t   f_ffree;   /* free file nodes in fs */
-.\"O     fsid_t       f_fsid;    /* file system id */
-.\"O     __SWORD_TYPE f_namelen; /* maximum length of filenames */
-.\"O     __SWORD_TYPE f_frsize;  /* fragment size (since Linux 2.6) */
-.\"O     __SWORD_TYPE f_spare[5];
     __SWORD_TYPE f_type;    /* ファイルシステムの種別 (下記参照) */
     __SWORD_TYPE f_bsize;   /* 最適な転送ブロックサイズ */
     fsblkcnt_t   f_blocks;  /* ファイルシステムの総データブロック数 */
@@ -112,8 +64,7 @@ struct statfs {
     __SWORD_TYPE f_spare[5];
 };
 
-.\"O File system types:
-ファイル・システムの型:
+ファイルシステムの型:
 
    ADFS_SUPER_MAGIC      0xadf5
    AFFS_SUPER_MAGIC      0xADFF
@@ -136,12 +87,9 @@ struct statfs {
    ISOFS_SUPER_MAGIC     0x9660
    JFFS2_SUPER_MAGIC     0x72b6
    JFS_SUPER_MAGIC       0x3153464a
-.\"O    MINIX_SUPER_MAGIC     0x137F /* orig. minix */
    MINIX_SUPER_MAGIC     0x137F /* オリジナルの minix */
-.\"O    MINIX_SUPER_MAGIC2    0x138F /* 30 char minix */
    MINIX_SUPER_MAGIC2    0x138F /* 30 文字ファイル名の minix */
    MINIX2_SUPER_MAGIC    0x2468 /* minix V2 */
-.\"O    MINIX2_SUPER_MAGIC2   0x2478 /* minix V2, 30 char names */
    MINIX2_SUPER_MAGIC2   0x2478 /* minix V2, 30 文字ファイル名 */
    MSDOS_SUPER_MAGIC     0x4d44
    NCP_SUPER_MAGIC       0x564c
@@ -166,272 +114,82 @@ struct statfs {
 .fi
 .in
 .PP
-.\"O Nobody knows what
-.\"O .I f_fsid
-.\"O is supposed to contain (but see below).
-.I f_fsid
-にどんな値が入るべきなのかは誰も知らない (但し、下記を参照)。
+\fIf_fsid\fP にどんな値が入るべきなのかは誰も知らない (但し、下記を参照)。
 .PP
-.\"O Fields that are undefined for a particular file system are set to 0.
-.\"O .BR fstatfs ()
-.\"O returns the same information about an open file referenced by descriptor
-.\"O .IR fd .
-それぞれのファイル・システムにおいて未定義のフィールドには 0 が
-設定される。
-.BR fstatfs ()
-はディスクリプター
-.I fd
+それぞれのファイルシステムにおいて未定義のフィールドには 0 が 設定される。 \fBfstatfs\fP()  はディスクリプター \fIfd\fP
 によって参照されるオープンされたファイルについて、同じ情報を返す。
-.\"O .SH "RETURN VALUE"
 .SH 返り値
-.\"O On success, zero is returned.
-.\"O On error, \-1 is returned, and
-.\"O .I errno
-.\"O is set appropriately.
-成功すれば 0 が返される。エラーの場合は \-1 が返され、
-.I errno
-が適切に設定される。
-.\"O .SH ERRORS
+成功した場合、0 が返される。 失敗した場合、 \-1 が返され、 \fIerrno\fP に適切な値がセットされる。
 .SH エラー
-.TP
-.B EACCES
-.\"O .RB ( statfs ())
-.\"O Search permission is denied for a component of the path prefix of
-.\"O .IR path .
-.RB ( statfs ()
-の場合)
-.I path
-のディレクトリ部分に検索許可が与えられていない
-.\"O (See also
-.\"O .BR path_resolution (7).)
-.RB ( path_resolution (7)
+.TP 
+\fBEACCES\fP
+(\fBstatfs\fP()  の場合)  \fIpath\fP のディレクトリ部分に検索許可が与えられていない (\fBpath_resolution\fP(7)
 も参照すること)。
-.TP
-.B EBADF
-.\"O .RB ( fstatfs ())
-.\"O .I fd
-.\"O is not a valid open file descriptor.
-.RB ( fstatfs ()
-の場合)
-.I fd
-は有効なオープンされたファイル・ディスクリプターではない。
-.TP
-.B EFAULT
-.\"O .I buf
-.\"O or
-.\"O .I path
-.\"O points to an invalid address.
-.I buf
-または
-.I path
-が不正なアドレスを指している。
-.TP
-.B EINTR
-.\"O This call was interrupted by a signal.
+.TP 
+\fBEBADF\fP
+(\fBfstatfs\fP()  の場合)  \fIfd\fP は有効なオープンされたファイルディスクリプターではない。
+.TP 
+\fBEFAULT\fP
+\fIbuf\fP または \fIpath\fP が不正なアドレスを指している。
+.TP 
+\fBEINTR\fP
 この呼び出しがシグナルで中断された。
-.TP
-.B EIO
-.\"O An I/O error occurred while reading from the file system.
-ファイル・システムの読み込みの間に I/O エラーが発生した。
-.TP
-.B ELOOP
-.\"O .RB ( statfs ())
-.\"O Too many symbolic links were encountered in translating
-.\"O .IR path .
-.RB ( statfs ()
-の場合)
-.I path
-を解決するのに辿るべきシンボリック・リンクが多すぎる。
-.TP
-.B ENAMETOOLONG
-.\"O .RB ( statfs ())
-.\"O .I path
-.\"O is too long.
-.RB ( statfs ()
-の場合)
-.I path
-が長過ぎる。
-.TP
-.B ENOENT
-.\"O .RB ( statfs ())
-.\"O The file referred to by
-.\"O .I path
-.\"O does not exist.
-.RB ( statfs ()
-の場合)
-.I path
-によって参照されるファイルが存在しない。
-.TP
-.B ENOMEM
-.\"O Insufficient kernel memory was available.
-カーネルに十分なメモリがない。
-.TP
-.B ENOSYS
-.\"O The file system does not support this call.
-ファイル・システムがこの呼び出しをサポートしていない。
-.TP
-.B ENOTDIR
-.\"O .RB ( statfs ())
-.\"O A component of the path prefix of
-.\"O .I path
-.\"O is not a directory.
-.RB ( statfs ()
-の場合)
-.I path
-のディレクトリ部分がディレクトリでない。
-.TP
-.B EOVERFLOW
-.\"O Some values were too large to be represented in the returned struct.
-値が大き過ぎるため、返り値の構造体で表現できない。
-.\"O .SH "CONFORMING TO"
+.TP 
+\fBEIO\fP
+ファイルシステムからの読み込みの間に I/O エラーが発生した。
+.TP 
+\fBELOOP\fP
+(\fBstatfs\fP()  の場合)  \fIpath\fP を解決するのに辿るべきシンボリックリンクが多すぎる。
+.TP 
+\fBENAMETOOLONG\fP
+(\fBstatfs\fP()  の場合)  \fIpath\fP が長過ぎる。
+.TP 
+\fBENOENT\fP
+(\fBstatfs\fP()  の場合)  \fIpath\fP によって参照されるファイルが存在しない。
+.TP 
+\fBENOMEM\fP
+十分なカーネルメモリがない。
+.TP 
+\fBENOSYS\fP
+ファイルシステムがこの呼び出しをサポートしていない。
+.TP 
+\fBENOTDIR\fP
+(\fBstatfs\fP()  の場合)  \fIpath\fP のディレクトリ部分がディレクトリでない。
+.TP 
+\fBEOVERFLOW\fP
+いくつかの値が大き過ぎて、返り値の構造体で表現できない。
 .SH 準拠
-.\"O Linux-specific.
-.\"O The Linux
-.\"O .BR statfs ()
-.\"O was inspired by the 4.4BSD one
-.\"O (but they do not use the same structure).
-Linux 固有である。
-Linux の
-.BR statfs ()
-は 4.4BSD のものに影響を受けている。
+Linux 固有である。 Linux の \fBstatfs\fP()  は 4.4BSD のものに影響を受けている。
 (しかし同じ構造体を使用しているわけではない)
-.\"O .SH NOTES
 .SH 注意
-.\"O The kernel has system calls
-.\"O .BR statfs (),
-.\"O .BR fstatfs (),
-.\"O .BR statfs64 (),
-.\"O and
-.\"O .BR fstatfs64 ()
-.\"O to support this library call.
-このライブラリコールをサポートするため、
-カーネルにはシステムコール
-.BR statfs (),
-.BR fstatfs (),
-.BR statfs64 (),
-.BR fstatfs64 ()
-がある。
+元々の Linux の \fBstatfs\fP() と \fBfstatfs\fP() システムコールは
+非常に大きなファイルサイズを念頭に入れて設計されていなかった。
+その後、Linux 2.6 で、新しい構造体 \fIstatfs64\fP を使用する
+新しいシステムコール \fBstatfs64\fP() と \fBfstatfs64\fP() が追加された。
+新しい構造体は元の \fIstatfs\fP 構造体と同じフィールドを持つが、
+いろいろなフィールドのサイズが大きなファイルサイズに対応できるように
+増やされている。 glibc の \fBstatfs\fP() と \fBfstatfs\fP() のラッパー関数は
+カーネルによるこれらの違いを吸収している。
 
-.\"O Some systems only have \fI<sys/vfs.h>\fP, other systems also have
-.\"O \fI<sys/statfs.h>\fP, where the former includes the latter.
-.\"O So it seems
-.\"O including the former is the best choice.
-\fI<sys/vfs.h>\fP しか持たないシステムもあり、
-\fI<sys/statfs.h>\fP も持っているシステムもある。
-前者は後者をインクルードするので、
-前者をインクルードするのが良いと考えられる。
+\fI<sys/vfs.h>\fP しか持たないシステムもあり、 \fI<sys/statfs.h>\fP
+も持っているシステムもある。 前者は後者をインクルードするので、 前者をインクルードするのが良いと考えられる。
 
-.\"O LSB has deprecated the library calls
-.\"O .BR statfs ()
-.\"O and
-.\"O .BR fstatfs ()
-.\"O and tells us to use
-.\"O .BR statvfs (2)
-.\"O and
-.\"O .BR fstatvfs (2)
-.\"O instead.
-LSB ではライブラリコール
-.BR statfs (),
-.BR fstatfs ()
-を非推奨として、代わりに
-.BR statvfs (2),
-.BR fstatvfs (2)
-を使うように指示している。
-.\"O .SS The f_fsid field
-.SS f_fsid フィールド
-.\"O Solaris, Irix and POSIX have a system call
-.\"O .BR statvfs (2)
-.\"O that returns a
-.\"O .I "struct statvfs"
-.\"O (defined in
-.\"O .IR <sys/statvfs.h> )
-.\"O containing an
-.\"O .I "unsigned long"
-.\"O .IR f_fsid .
-Solaris, Irix, POSIX にはシステムコール
-.BR statvfs (2)
-があり、
-.I "struct statvfs"
-を返す
-.RI ( <sys/statvfs.h>
-で定義されている)。
-この構造体には、
-.I "unsigned long"
-.I f_fsid
-が含まれている。
-.\"O Linux, SunOS, HP-UX, 4.4BSD have a system call
-.\"O .BR statfs ()
-.\"O that returns a
-.\"O .I "struct statfs"
-.\"O (defined in
-.\"O .IR <sys/vfs.h> )
-.\"O containing a
-.\"O .I fsid_t
-.\"O .IR f_fsid ,
-.\"O where
-.\"O .I fsid_t
-.\"O is defined as
-.\"O .IR "struct { int val[2]; }" .
-Linux, SunOS, HP-UX, 4.4BSD にはシステムコール
-.BR statfs ()
-があり、
-.I "struct statfs"
-を返す
-.RI ( <sys/vfs.h>
-で定義されている)。
-この構造体には
-.I fsid_t
-.IR f_fsid ,
-が含まれており、
-.I fsid_t
-は
-.I "struct { int val[2]; }"
-と定義されている。
-.\"O The same holds for FreeBSD, except that it uses the include file
-.\"O .IR <sys/mount.h> .
-FreeBSD でも同じであるが、インクルードファイル
-.I <sys/mount.h>
-を使う。
+LSB ではライブラリコール \fBstatfs\fP(), \fBfstatfs\fP()  を非推奨として、代わりに \fBstatvfs\fP(2),
+\fBfstatvfs\fP(2)  を使うように指示している。
+.SS "f_fsid フィールド"
+Solaris, Irix, POSIX にはシステムコール \fBstatvfs\fP(2)  があり、 \fIstruct statvfs\fP を返す
+(\fI<sys/statvfs.h>\fP で定義されている)。 この構造体には、 \fIunsigned long\fP \fIf_fsid\fP
+が含まれている。 Linux, SunOS, HP\-UX, 4.4BSD にはシステムコール \fBstatfs\fP()  があり、 \fIstruct
+statfs\fP を返す (\fI<sys/vfs.h>\fP で定義されている)。 この構造体には \fIfsid_t\fP \fIf_fsid\fP,
+が含まれており、 \fIfsid_t\fP は \fIstruct { int val[2]; }\fP と定義されている。 FreeBSD
+でも同じであるが、インクルードファイル \fI<sys/mount.h>\fP を使う。
 
-.\"O The general idea is that
-.\"O .I f_fsid
-.\"O contains some random stuff such that the pair
-.\"O .RI ( f_fsid , ino )
-.\"O uniquely determines a file.
-.I f_fsid
-はあるランダムな値を持ち、
-.RI ( f_fsid , ino )
-という 1 組の値でファイルを一意に決定できるようにする、
-というのが基本的な考え方である。
-.\"O Some operating systems use (a variation on) the device number, or the device number
-.\"O combined with the file-system type.
-いくつかの OS では、デバイス番号 (の変種) を使ったり、
-デバイス番号とファイル・システムタイプを組み合わせて使ったりしている。
-.\"O Several OSes restrict giving out the
-.\"O .I f_fsid
-.\"O field to the superuser only (and zero it for unprivileged users),
-.\"O because this field is used in the filehandle of the file system
-.\"O when NFS-exported, and giving it out is a security concern.
-OS の中には
-.I f_fsid
-フィールドの取得をスーパーユーザに限定しているものもある
-(非特権ユーザが取得すると 0 となる)。
-NFS でエクスポートされる場合、
-このフィールドがファイル・システムのファイルハンドルで使われており、
-この値を提供するとセキュリティ上の問題がある。
+\fIf_fsid\fP はあるランダムな値を持ち、 (\fIf_fsid\fP,\fIino\fP)  という 1 組の値でファイルを一意に決定できるようにする、
+というのが基本的な考え方である。 いくつかの OS では、デバイス番号 (の変種) を使ったり、
+デバイス番号とファイルシステムタイプを組み合わせて使ったりしている。 OS の中には \fIf_fsid\fP
+フィールドの取得をスーパーユーザに限定しているものもある (非特権ユーザが取得すると 0 となる)。 NFS でエクスポートされる場合、
+このフィールドがファイルシステムのファイルハンドルで使われており、 この値を提供するとセキュリティ上の問題がある。
 .LP
-.\"O Under some operating systems the
-.\"O .I fsid
-.\"O can be used as second argument to the
-.\"O .BR sysfs (2)
-.\"O system call.
-いくつかの OS では、
-.I fsid
-を
-.BR sysfs (2)
-システムコールの第 2 引き数として使用できる。
-.\"O .SH "SEE ALSO"
+いくつかの OS では、 \fIfsid\fP を \fBsysfs\fP(2)  システムコールの第 2 引き数として使用できる。
 .SH 関連項目
-.BR stat (2),
-.BR statvfs (2),
-.BR path_resolution (7)
+\fBstat\fP(2), \fBstatvfs\fP(2), \fBpath_resolution\fP(7)