OSDN Git Service

Convert release and draft pages to UTF-8.
[linuxjm/jm.git] / manual / LDP_man-pages / draft / man3 / getmntent.3
index 4fe1626..ae20388 100644 (file)
 .\"O .SH NAME
 .\"O getmntent, setmntent, addmntent, endmntent, hasmntopt,
 .\"O getmntent_r \- get file system descriptor file entry
-.SH Ì¾Á°
+.SH 名前
 getmntent, setmntent, addmntent, endmntent, hasmntopt,
-getmntent_r \- ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥àµ­½Ò¥Õ¥¡¥¤¥ë¤Î¥¨¥ó¥È¥ê¤ò¼èÆÀ¤¹¤ë
+getmntent_r \- ファイルシステム記述ファイルのエントリを取得する
 .\"O .SH SYNOPSIS
-.SH ½ñ¼°
+.SH 書式
 .nf
 .B #include <stdio.h>
 .B #include <mntent.h>
@@ -56,7 +56,7 @@ getmntent_r \- 
 .BI "char *hasmntopt(const struct mntent *" mnt ", const char *" opt );
 .sp
 .\"O /* GNU extension */
-/* GNU ¤Ë¤è¤ë³ÈÄ¥ */
+/* GNU による拡張 */
 .B #include <mntent.h>
 .sp
 .BI "struct mntent *getmntent_r(FILE *" fp ", struct mntent *" mntbuf ,
@@ -66,21 +66,21 @@ getmntent_r \- 
 .in -4n
 .\"O Feature Test Macro Requirements for glibc (see
 .\"O .BR feature_test_macros (7)):
-glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
+glibc 向けの機能検査マクロの要件
 .RB ( feature_test_macros (7)
-»²¾È):
+参照):
 .in
 .sp
 .BR getmntent_r ():
 _BSD_SOURCE || _SVID_SOURCE
 .\"O .SH DESCRIPTION
-.SH ÀâÌÀ
+.SH 説明
 .\"O These routines are used to access the file system description file
 .\"O \fI/etc/fstab\fP and the mounted file system description file
 .\"O \fI/etc/mtab\fP.
-¤³¤ì¤é¤Î¥ë¡¼¥Á¥ó¤Ï¡¢¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤òµ­½Ò¤·¤¿¥Õ¥¡¥¤¥ë \fI/etc/fstab\fP
-¤È¡¢¥Þ¥¦¥ó¥È¤µ¤ì¤Æ¤¤¤ë¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤òµ­½Ò¤·¤¿¥Õ¥¡¥¤¥ë
-\fI/etc/mtab\fP ¤Ë¥¢¥¯¥»¥¹¤¹¤ë¤¿¤á¤ËÍѤ¤¤é¤ì¤ë¡£
+これらのルーチンは、ファイルシステムを記述したファイル \fI/etc/fstab\fP
+と、マウントされているファイルシステムを記述したファイル
+\fI/etc/mtab\fP にアクセスするために用いられる。
 .PP
 .\"O The
 .\"O .BR setmntent ()
@@ -91,12 +91,12 @@ _BSD_SOURCE || _SVID_SOURCE
 .\"O required and can take the same values as the \fImode\fP argument of
 .\"O .BR fopen (3).
 .BR setmntent ()
-´Ø¿ô¤Ï¡¢¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Îµ­½Ò¥Õ¥¡¥¤¥ë \fIfilename\fP ¤ò¥ª¡¼¥×¥ó¤·¤Æ¡¢
-¤½¤Î¥Õ¥¡¥¤¥ë¥Ý¥¤¥ó¥¿¤òÊÖ¤¹¡£¤³¤Î¥Õ¥¡¥¤¥ë¥Ý¥¤¥ó¥¿¤Ï
+関数は、ファイルシステムの記述ファイル \fIfilename\fP をオープンして、
+そのファイルポインタを返す。このファイルポインタは
 .BR getmntent ()
-¤Ë¤è¤Ã¤ÆÍѤ¤¤é¤ì¤ë¡£°ú¤­¿ô \fItype\fP ¤ÏÍ׵᤹¤ë¥¢¥¯¥»¥¹·Á¼°¤Ç¡¢
+によって用いられる。引き数 \fItype\fP は要求するアクセス形式で、
 .BR fopen (3)
-¤Î \fImode\fP °ú¤­¿ô¤ÈƱ¤¸Ãͤò¼è¤ë¤³¤È¤¬¤Ç¤­¤ë¡£
+の \fImode\fP 引き数と同じ値を取ることができる。
 .PP
 .\"O The
 .\"O .BR getmntent ()
@@ -108,11 +108,11 @@ _BSD_SOURCE || _SVID_SOURCE
 .\"O calls to
 .\"O .BR getmntent ().
 .BR getmntent ()
-´Ø¿ô¤Ï¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Îµ­½Ò¥Õ¥¡¥¤¥ë \fIfp\fP ¤«¤é¿·¤·¤¤¹Ô¤òÆÉ
-¤ß¹þ¤ß¡¢¹Ô¤ò¥Õ¥£¡¼¥ë¥É¤Ëʬ³ä¤·¤¿ÆâÍƤò¼ý¤á¤¿¹½Â¤ÂΤؤΥݥ¤¥ó¥¿¤òÊÖ¤¹¡£
-¥Ý¥¤¥ó¥¿¤Ï¥á¥â¥ê¤ÎÀÅŪ¤ÊÎΰè¤ò»Ø¤·¤Æ¤ª¤ê¡¢¤³¤ÎÎΰè¤Ï
+関数はファイルシステムの記述ファイル \fIfp\fP から新しい行を読
+み込み、行をフィールドに分割した内容を収めた構造体へのポインタを返す。
+ポインタはメモリの静的な領域を指しており、この領域は
 .BR getmntent ()
-¤ò¼¡¤Ë¸Æ¤Ó½Ð¤·¤¿¤È¤­¤Ë¾å½ñ¤­¤µ¤ì¤Æ¤·¤Þ¤¦¡£
+を次に呼び出したときに上書きされてしまう。
 .PP
 .\"O The
 .\"O .BR addmntent ()
@@ -121,17 +121,17 @@ _BSD_SOURCE || _SVID_SOURCE
 .\"O structure \fImnt\fP to
 .\"O the end of the open file \fIfp\fP.
 .BR addmntent ()
-´Ø¿ô¤Ï
+関数は
 .I mntent
-¹½Â¤ÂΠ\fImnt\fP ¤ÎÆâÍƤò¡¢¥ª¡¼¥×¥ó¤µ¤ì¤Æ¤¤¤ë¥Õ¥¡¥¤¥ë
-\fIfp\fP ¤ÎºÇ¸å¤ËÄɲ乤롣
+構造体 \fImnt\fP の内容を、オープンされているファイル
+\fIfp\fP の最後に追加する。
 .PP
 .\"O The
 .\"O .BR endmntent ()
 .\"O function closes the file system description file
 .\"O \fIfp\fP.
 .BR endmntent ()
-´Ø¿ô¤Ï¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Îµ­½Ò¥Õ¥¡¥¤¥ë \fIfp\fP ¤òÊĤ¸¤ë¡£
+関数はファイルシステムの記述ファイル \fIfp\fP を閉じる。
 .PP
 .\"O The
 .\"O .BR hasmntopt ()
@@ -143,13 +143,13 @@ _BSD_SOURCE || _SVID_SOURCE
 .\"O .BR mount (8)
 .\"O for valid mount options.
 .BR hasmntopt ()
-´Ø¿ô¤Ï
+関数は
 .I mntent
-¹½Â¤ÂΠ\fImnt\fP ¤Î \fImnt_opts\fP ¥Õ¥£¡¼¥ë¥É (²¼µ­
-»²¾È) ¤ò¥¹¥­¥ã¥ó¤·¡¢ \fIopt\fP ¤Ë°ìÃפ¹¤ëÉôʬʸ»úÎ󤬤¢¤ë¤«¤òÄ´¤Ù¤ë¡£
-Í­¸ú¤Ê¥Þ¥¦¥ó¥È¥ª¥×¥·¥ç¥ó¤Ë¤Ä¤¤¤Æ¤Ï \fI<mntent.h>\fP ¤È
+構造体 \fImnt\fP の \fImnt_opts\fP フィールド (下記
+参照) をスキャンし、 \fIopt\fP に一致する部分文字列があるかを調べる。
+有効なマウントオプションについては \fI<mntent.h>\fP と
 .BR mount (8)
-¤ò»²¾È¤Î¤³¤È¡£
+を参照のこと。
 .PP
 .\"O The reentrant \fBgetmntent_r\fP() function is similar to
 .\"O .BR getmntent (),
@@ -160,23 +160,23 @@ _BSD_SOURCE || _SVID_SOURCE
 .\"O .I buf
 .\"O of size
 .\"O .IR buflen .
-¥ê¥¨¥ó¥È¥é¥ó¥È¤Ê´Ø¿ô
+リエントラントな関数
 .BR getmntent_r ()
-¤Ï
+は
 .BR getmntent ()
-¤ÈƱ¤¸¤À¤¬¡¢
-¥æ¡¼¥¶¤¬ÍÑ°Õ¤·¤¿
+と同じだが、
+ユーザが用意した
 .I *mntbuf
-¤Ë \fIstruct mount\fP ¤ò³ÊǼ¤·¡¢¤½¤Î¹½Â¤ÂΤγƥ¨¥ó¥È¥ê¤¬»Ø¤·¼¨¤¹Ê¸»úÎó¤ò
-¥æ¡¼¥¶¤¬ÍÑ°Õ¤·¤¿Â礭¤µ
+に \fIstruct mount\fP を格納し、その構造体の各エントリが指し示す文字列を
+ユーザが用意した大きさ
 .I buflen
-¤ÎÇÛÎó
+の配列
 .I buf
-¤Ë½ñ¤­¹þ¤à¡£
+に書き込む。
 
 .PP
 .\"O The \fImntent\fP structure is defined in \fI<mntent.h>\fP as follows:
-\fImntent\fP ¹½Â¤ÂΤϠ\fI<mntent.h>\fP ¤Ç°Ê²¼¤Î¤è¤¦¤ËÄêµÁ¤µ¤ì¤Æ¤¤¤ë¡£
+\fImntent\fP 構造体は \fI<mntent.h>\fP で以下のように定義されている。
 .sp
 .in +4n
 .nf
@@ -203,20 +203,20 @@ struct mntent {
 .\"O .BR getmntent ()
 .\"O will convert
 .\"O from string representation to escaped representation and back.
-mtab ¤ä fstab ¥Õ¥¡¥¤¥ë¤Ç¤Ï¡¢³Æ¥Õ¥£¡¼¥ë¥É¤Ï¶õÇò¤Ç¶èÀÚ¤é¤ì¤Æ¤¤¤ë¤Î¤Ç¡¢
-¥¹¥Ú¡¼¥¹¡¢¥¿¥Ö¡¢²þ¹Ô¡¢¥Ð¥Ã¥¯¥¹¥é¥Ã¥·¥å¤Î 4ʸ»ú¤ò¤³¤ì¤é¤Î¥Õ¥¡¥¤¥ë¤Ç
-»È¤¤¤¿¤¤¾ì¹ç¤Ç¡¢¤«¤Ä
+mtab や fstab ファイルでは、各フィールドは空白で区切られているので、
+スペース、タブ、改行、バックスラッシュの 4文字をこれらのファイルで
+使いたい場合で、かつ
 .I mntent
-¹½Â¤ÂΤΠ4¤Ä¤Îʸ»úÎó¥á¥ó¥Ð¡¼¤Î¤¤¤º¤ì¤«¤ËÂбþ¤¹¤ë¥Õ¥£¡¼¥ë¥ÉÆâ¤Ç
-»È¤¤¤¿¤¤¾ì¹ç¤Ë¤Ï¡¢8¿Ê¤Î¥¨¥¹¥±¡¼¥×ɽµ­¤ò»È¤Ã¤Æɽ¸½¤¹¤ë:
-¥¹¥Ú¡¼¥¹ (\e040), ¥¿¥Ö (\e011), ²þ¹Ô (\e012), ¥Ð¥Ã¥¯¥¹¥é¥Ã¥·¥å (\e134)¡£
+構造体の 4つの文字列メンバーのいずれかに対応するフィールド内で
+使いたい場合には、8進のエスケープ表記を使って表現する:
+スペース (\e040), タブ (\e011), 改行 (\e012), バックスラッシュ (\e134)。
 .BR addmntent ()
-¤È
+と
 .BR getmntent ()
-¤Ï¡¢Ê¸»úÎóɽ¸½¤«¤é
-¥¨¥¹¥±¡¼¥×ɽ¸½¤Ø¤ÎÊÑ´¹¡¢¤ª¤è¤Ó¤½¤ÎµÕ¤ò¹Ô¤¦¡£
+は、文字列表現から
+エスケープ表現への変換、およびその逆を行う。
 .\"O .SH "RETURN VALUE"
-.SH ÊÖ¤êÃÍ
+.SH 返り値
 .\"O The
 .\"O .BR getmntent ()
 .\"O and
@@ -226,52 +226,52 @@ mtab 
 .\"O .I mntent
 .\"O structure or NULL on failure.
 .BR getmntent ()
-¤È
+と
 .BR getmntent_r ()
-¤Ï
+は
 .I mntent
-¹½Â¤ÂΤؤΥݥ¤¥ó¥¿¤òÊÖ¤¹¡£
-¼ºÇÔ¤·¤¿¾ì¹ç¤Ï NULL ¤òÊÖ¤¹¡£
+構造体へのポインタを返す。
+失敗した場合は NULL を返す。
 .PP
 .\"O The
 .\"O .BR addmntent ()
 .\"O function returns 0 on success and 1 on failure.
-.\Baddmntent\fP() ´Ø¿ô¤ÏÀ®¸ù¤·¤¿¤é 0 ¤òÊÖ¤·¡¢¼ºÇÔ¤·¤¿¤é 1 ¤òÊÖ¤¹¡£
+.\Baddmntent\fP() 関数は成功したら 0 を返し、失敗したら 1 を返す。
 .PP
 .\"O The
 .\"O .BR endmntent ()
 .\"O function always returns 1.
 .BR endmntent ()
-´Ø¿ô¤Ï¤Ä¤Í¤Ë 1 ¤òÊÖ¤¹¡£
+関数はつねに 1 を返す。
 .PP
 .\"O The
 .\"O .BR hasmntopt ()
 .\"O function returns the address of the substring if
 .\"O a match is found and NULL otherwise.
 .BR hasmntopt ()
-´Ø¿ô¤Ï¡¢¥Þ¥Ã¥Á¤·¤¿¾ì¹ç¤ÏÉôʬʸ»úÎó¤Ø¤Î¥¢¥É¥ì¥¹¤òÊÖ¤·¡¢
-¥Þ¥Ã¥Á¤·¤Ê¤±¤ì¤Ð NULL ¤òÊÖ¤¹¡£
+関数は、マッチした場合は部分文字列へのアドレスを返し、
+マッチしなければ NULL を返す。
 .\"O .SH FILES
-.SH ¥Õ¥¡¥¤¥ë
+.SH ファイル
 .nf
 .\"O /etc/fstab          file system description file
 .\"O /etc/mtab           mounted file system description file
-/etc/fstab          ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥àµ­½Ò¥Õ¥¡¥¤¥ë
-/etc/mtab           ¥Þ¥¦¥ó¥È¤µ¤ì¤¿¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Îµ­½Ò¥Õ¥¡¥¤¥ë
+/etc/fstab          ファイルシステム記述ファイル
+/etc/mtab           マウントされたファイルシステムの記述ファイル
 .fi
 .\"O .SH "CONFORMING TO"
-.SH ½àµò
+.SH 準拠
 .\"O The nonreentrant functions are from SunOS 4.1.3.
 .\"O A routine
 .\"O .BR getmntent_r ()
 .\"O was introduced in HP-UX 10, but it returns an int.
 .\"O The prototype shown above is glibc-only.
-¥ê¥¨¥ó¥È¥é¥ó¥È¤Ç¤Ê¤¤´Ø¿ô¤Ï SunOS 4.1.3 Í³Íè¤Î¤â¤Î¤Ç¤¢¤ë¡£
+リエントラントでない関数は SunOS 4.1.3 由来のものである。
 .BR getmntent_r ()
-´Ø¿ô¤Ï HPUX 10 ¤ÇƳÆþ¤µ¤ì¤¿¤¬¡¢¤³¤Î¥Ð¡¼¥¸¥ç¥ó¤Ç¤Ï int ¤òÊÖ¤¹¡£
-¾åµ­¤Ë¼¨¤·¤¿¥×¥í¥È¥¿¥¤¥×¤Ï glibc Æȼ«¤Î¤â¤Î¤Ç¤¢¤ë¡£
+関数は HPUX 10 で導入されたが、このバージョンでは int を返す。
+上記に示したプロトタイプは glibc 独自のものである。
 .\"O .SH NOTES
-.SH Ãí°Õ
+.SH 注意
 .\"O System V also has a
 .\"O .BR getmntent ()
 .\"O function but the calling sequence
@@ -279,25 +279,25 @@ mtab 
 .\"O Under System V
 .\"O .I /etc/mnttab
 .\"O is used.
-System V ¤Ë¤â
+System V にも
 .BR getmntent ()
-´Ø¿ô¤Ï¤¢¤ë¤¬¡¢
-¸Æ¤Ó½Ð¤·¼ê½ç¤¬°Û¤Ê¤ê¡¢ÊÖ¤µ¤ì¤ë¹½Â¤ÂΤâ°Û¤Ê¤ë¡£
-System V ¤Ç¤Ï
+関数はあるが、
+呼び出し手順が異なり、返される構造体も異なる。
+System V では
 .I /etc/mnttab
-¤¬ÍѤ¤¤é¤ì¤ë¡£
+が用いられる。
 .\"O 4.4BSD and Digital UNIX have a routine
 .\"O .BR getmntinfo (),
 .\"O a wrapper around the system call
 .\"O .BR getfsstat ().
-4.4BSD ¤È Digital UNIX ¤Ë¤Ï
+4.4BSD と Digital UNIX には
 .BR getmntinfo ()
-¤¬¤¢¤ë¤¬¡¢
-¥·¥¹¥Æ¥à¥³¡¼¥ë
+があるが、
+システムコール
 .BR getfsstat ()
-¤Î¥é¥Ã¥Ñ¡¼´Ø¿ô¤Ç¤¢¤ë¡£
+のラッパー関数である。
 .\"O .SH "SEE ALSO"
-.SH ´ØÏ¢¹àÌÜ
+.SH 関連項目
 .BR fopen (3),
 .BR fstab (5),
 .BR mount (8)