OSDN Git Service

(split) LDP: Restore and add Copyrights for draft pages
[linuxjm/LDP_man-pages.git] / draft / man2 / statfs.2
index bf42bad..b4455ea 100644 (file)
@@ -1,5 +1,6 @@
 .\" Copyright (C) 2003 Andries Brouwer (aeb@cwi.nl)
 .\"
+.\" %%%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
 .\"
 .\" Modified 2003-08-17 by Walter Harms
 .\" Modified 2004-06-23 by Michael Kerrisk <mtk.manpages@gmail.com>
 .\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
 .\" Japanese Version Copyright (c) 1997 HANATAKA Shinya
 .\"         all rights reserved.
 .\" Translated Fri Dec 12 00:25:54 JST 1997
 .\" 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
+.\" Updated 2012-04-30, Akihiro MOTOKI <amotoki@gmail.com>
 .\"
-.\"WORD:       file system             ¥Õ¥¡¥¤¥ë¡¦¥·¥¹¥Æ¥à
-.\"WORD:       mount                   ¥Þ¥¦¥ó¥È
-.\"WORD:       pointer                 ¥Ý¥¤¥ó¥¿¡¼
-.\"WORD:       descriptor              ¥Ç¥£¥¹¥¯¥ê¥×¥¿¡¼
-.\"WORD:       open                    ¥ª¡¼¥×¥ó
-.\"WORD:       symbolic link           ¥·¥ó¥Ü¥ê¥Ã¥¯¡¦¥ê¥ó¥¯
-.\"WORD:       open                    ¥ª¡¼¥×¥ó
-.\"
-.TH STATFS 2 2010-09-04 "Linux" "Linux Programmer's Manual"
-.\"O .SH NAME
-.SH Ì¾Á°
-.\"O statfs, fstatfs \- get file system statistics
-statfs, fstatfs \- ¥Õ¥¡¥¤¥ë¡¦¥·¥¹¥Æ¥à¤ÎÅý·×¤òÆÀ¤ë
-.\"O .SH SYNOPSIS
-.SH ½ñ¼°
-.\"O .BR "#include <sys/vfs.h>    " "/* or <sys/statfs.h> */"
-.BR "#include <sys/vfs.h>    " "/* ¤Þ¤¿¤Ï <sys/statfs.h> */"
+.TH STATFS 2 2010\-11\-21 Linux "Linux Programmer's Manual"
+.SH 名前
+statfs, fstatfs \- ファイルシステムの統計を取得する
+.SH 書式
+\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           /* ¥·¥¹¥Æ¥à¤Î¥ï¡¼¥É¥µ¥¤¥º */
+#if __WORDSIZE == 32           /* システムのワードサイズ */
 # define __SWORD_TYPE           int
 #else /* __WORDSIZE == 64 */
 # define __SWORD_TYPE          long int
 #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;  /* ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤ÎÁí¥Ç¡¼¥¿¥Ö¥í¥Ã¥¯¿ô */
-    fsblkcnt_t   f_bfree;   /* ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Î¶õ¤­¥Ö¥í¥Ã¥¯¿ô */
-    fsblkcnt_t   f_bavail;  /* ÈóÆø¢¥æ¡¼¥¶¤¬ÍøÍѲÄǽ¤Ê¶õ¤­¥Ö¥í¥Ã¥¯¿ô */
-    fsfilcnt_t   f_files;   /* ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤ÎÁí¥Õ¥¡¥¤¥ë¥Î¡¼¥É¿ô */
-    fsfilcnt_t   f_ffree;   /* ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Î¶õ¤­¥Õ¥¡¥¤¥ë¥Î¡¼¥É¿ô */
-    fsid_t       f_fsid;    /* ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Î ID */
-    __SWORD_TYPE f_namelen; /* ¥Õ¥¡¥¤¥ë̾¤ÎºÇÂçĹ */
-    __SWORD_TYPE f_frsize;  /* ¥Õ¥é¥°¥á¥ó¥È¥µ¥¤¥º (Linux 2.6 °Ê¹ß) */
+    __SWORD_TYPE f_type;    /* ファイルシステムの種別 (下記参照) */
+    __SWORD_TYPE f_bsize;   /* 最適な転送ブロックサイズ */
+    fsblkcnt_t   f_blocks;  /* ファイルシステムの総データブロック数 */
+    fsblkcnt_t   f_bfree;   /* ファイルシステムの空きブロック数 */
+    fsblkcnt_t   f_bavail;  /* 非特権ユーザが利用可能な空きブロック数 */
+    fsfilcnt_t   f_files;   /* ファイルシステムの総ファイルノード数 */
+    fsfilcnt_t   f_ffree;   /* ファイルシステムの空きファイルノード数 */
+    fsid_t       f_fsid;    /* ファイルシステムの ID */
+    __SWORD_TYPE f_namelen; /* ファイル名の最大長 */
+    __SWORD_TYPE f_frsize;  /* フラグメントサイズ (Linux 2.6 以降) */
     __SWORD_TYPE f_spare[5];
 };
 
-.\"O File system types:
-¥Õ¥¡¥¤¥ë¡¦¥·¥¹¥Æ¥à¤Î·¿:
+ファイルシステムの型:
 
    ADFS_SUPER_MAGIC      0xadf5
    AFFS_SUPER_MAGIC      0xADFF
@@ -136,13 +103,10 @@ 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 */
+   MINIX_SUPER_MAGIC     0x137F /* オリジナルの 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 Ê¸»ú¥Õ¥¡¥¤¥ë̾ */
+   MINIX2_SUPER_MAGIC2   0x2478 /* minix V2, 30 文字ファイル名 */
    MSDOS_SUPER_MAGIC     0x4d44
    NCP_SUPER_MAGIC       0x564c
    NFS_SUPER_MAGIC       0x6969
@@ -166,272 +130,86 @@ 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
-¤Ë¤è¤Ã¤Æ»²¾È¤µ¤ì¤ë¥ª¡¼¥×¥ó¤µ¤ì¤¿¥Õ¥¡¥¤¥ë¤Ë¤Ä¤¤¤Æ¡¢Æ±¤¸¾ðÊó¤òÊÖ¤¹¡£
-.\"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
-.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
-.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
-.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"
-.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 ¤Î¤â¤Î¤Ë±Æ¶Á¤ò¼õ¤±¤Æ¤¤¤ë¡£
-(¤·¤«¤·Æ±¤¸¹½Â¤ÂΤò»ÈÍѤ·¤Æ¤¤¤ë¤ï¤±¤Ç¤Ï¤Ê¤¤)
-.\"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 ()
-¤¬¤¢¤ë¡£
+それぞれのファイルシステムにおいて未定義のフィールドには 0 が 設定される。 \fBfstatfs\fP()  はディスクリプター \fIfd\fP
+によって参照されるオープンされたファイルについて、同じ情報を返す。
+.SH 返り値
+成功した場合、0 が返される。 失敗した場合、 \-1 が返され、 \fIerrno\fP に適切な値がセットされる。
+.SH エラー
+.TP 
+\fBEACCES\fP
+(\fBstatfs\fP()  の場合)  \fIpath\fP のディレクトリ部分に検索許可が与えられていない (\fBpath_resolution\fP(7)
+も参照すること)。
+.TP 
+\fBEBADF\fP
+(\fBfstatfs\fP()  の場合)  \fIfd\fP は有効なオープンされたファイルディスクリプターではない。
+.TP 
+\fBEFAULT\fP
+\fIbuf\fP または \fIpath\fP が不正なアドレスを指している。
+.TP 
+\fBEINTR\fP
+この呼び出しがシグナルで中断された。
+.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 準拠
+Linux 固有である。 Linux の \fBstatfs\fP()  は 4.4BSD のものに影響を受けている。
+(しかし同じ構造体を使用しているわけではない)
+.SH 注意
+元々の 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"
-.SH ´ØÏ¢¹àÌÜ
-.BR stat (2),
-.BR statvfs (2),
-.BR path_resolution (7)
+いくつかの OS では、 \fIfsid\fP を \fBsysfs\fP(2)  システムコールの第 2 引き数として使用できる。
+.SH 関連項目
+\fBstat\fP(2), \fBstatvfs\fP(2), \fBpath_resolution\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。