X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=release%2Fman3%2Fgetfsent.3;h=89d0420e62cda36551e5fd2a83b38392cad0db7c;hb=385329a00e7910812cffee7720cbd7ae0321afc5;hp=6687fae2ff23df398e1642e5bdab2873cb7dc879;hpb=7e089fcc022461849bbc09437103cc337a88dd9c;p=linuxjm%2FLDP_man-pages.git diff --git a/release/man3/getfsent.3 b/release/man3/getfsent.3 index 6687fae2..89d0420e 100644 --- a/release/man3/getfsent.3 +++ b/release/man3/getfsent.3 @@ -1,5 +1,6 @@ .\" Copyright (C) 2002 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. @@ -19,38 +20,43 @@ .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. +.\" %%%LICENSE_END .\" .\" Inspired by a page written by Walter Harms. .\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.\" .\" Japanese Version Copyright (c) 2002 NAKANO Takeo all rights reserved. .\" Translated Wed 7 Aug 2002 by NAKANO Takeo .\" -.TH GETFSENT 3 2002-02-28 "Linux" "Linux Programmer's Manual" -.SH ̾Á° -getfsent, getfsspec, getfsfile, setfsent, endfsent \- fstab ¥¨¥ó¥È¥ê¤Î½èÍý -.SH ½ñ¼° -.B #include +.TH GETFSENT 3 2002\-02\-28 Linux "Linux Programmer's Manual" +.SH 名前 +getfsent, getfsspec, getfsfile, setfsent, endfsent \- fstab エントリの処理 +.SH 書式 +\fB#include \fP .sp -.B "void endfsent(void);" +\fBvoid endfsent(void);\fP .sp -.B "struct fstab *getfsent(void);" +\fBstruct fstab *getfsent(void);\fP .sp -.BI "struct fstab *getfsfile(const char *" mount_point ); +\fBstruct fstab *getfsfile(const char *\fP\fImount_point\fP\fB);\fP .sp -.BI "struct fstab *getfsspec(const char *" special_file ); +\fBstruct fstab *getfsspec(const char *\fP\fIspecial_file\fP\fB);\fP .sp -.B "int setfsent(void);" -.SH ÀâÌÀ -¤³¤ì¤é¤Î´Ø¿ô¤Ï -.I /etc/fstab -¥Õ¥¡¥¤¥ë¤«¤é¾ðÊó¤òÆɤ߹þ¤à¡£\fIfstab\fP ¹½Â¤ÂΤϼ¡¤Î¤è¤¦¤ËÄêµÁ¤µ¤ì¤Æ¤¤¤ë¡£ +\fBint setfsent(void);\fP +.SH 説明 +これらの関数は \fI/etc/fstab\fP ファイルから情報を読み込む。\fIfstab\fP 構造体は次のように定義されている。 .LP .in +4n .nf struct fstab { char *fs_spec; /* block device name */ char *fs_file; /* mount point */ - char *fs_vfstype; /* file-system type */ + char *fs_vfstype; /* file\-system type */ char *fs_mntops; /* mount options */ const char *fs_type; /* rw/rq/ro/sw/xx option */ int fs_freq; /* dump frequency, in days */ @@ -59,80 +65,42 @@ struct fstab { .fi .in .PP -*BSD ¥·¥¹¥Æ¥à¤Î¾ì¹ç¡¢ -.I fs_type -¥Õ¥£¡¼¥ë¥É¤Ë¤Ï¡¢5 ¤Ä¤Îʸ»úÎó -"rw", "rq", "ro", "sw", "xx" -¤Î¤¤¤º¤ì¤«¤¬Æþ¤ë -(¤½¤ì¤¾¤ì read-write, quota ÉÕ¤­ read-write, read-only, swap, ignore)¡£ +*BSD システムの場合、 \fIfs_type\fP フィールドには、5 つの文字列 "rw", "rq", "ro", "sw", "xx" +のいずれかが入る (それぞれ read\-write, quota 付き read\-write, read\-only, swap, ignore)。 -´Ø¿ô -.BR setfsent () -¤Ï¸Æ¤Ó½Ð¤µ¤ì¤ë¤È fstab ¥Õ¥¡¥¤¥ë¤ò¥ª¡¼¥×¥ó¤·¡¢ -ºÇ½é¤Î¹Ô¤Ë°ÜÆ°¤¹¤ë¡£ +関数 \fBsetfsent\fP() は呼び出されると fstab ファイルをオープンし、 最初の行に移動する。 .LP -´Ø¿ô -.BR getfsent () -¤Ï fstab ¥Õ¥¡¥¤¥ë¤«¤é¼¡¤Î¹Ô¤ò¥Ñ¡¼¥¹¤¹¤ë -(ɬÍפʾì¹ç¤Ï¥Õ¥¡¥¤¥ë¤ò¥ª¡¼¥×¥ó¤¹¤ë)¡£ +関数 \fBgetfsent\fP() は fstab ファイルから次の行をパースする (必要な場合はファイルをオープンする)。 .LP -´Ø¿ô -.BR endfsent () -¤Ï¸Æ¤Ó½Ð¤µ¤ì¤ë¤È fstab ¥Õ¥¡¥¤¥ë¤ò¥¯¥í¡¼¥º¤¹¤ë¡£ +関数 \fBendfsent\fP() は呼び出されると fstab ファイルをクローズする。 .LP -´Ø¿ô -.BR getfsspec () -¤Ï fstab ¥Õ¥¡¥¤¥ë¤òÀèƬ¤«¤é¸¡º÷¤·¡¢ -.I fs_spec -¥Õ¥£¡¼¥ë¥É¤¬ -.I special_file -°ú¿ô¤Ë¥Þ¥Ã¥Á¤¹¤ë¥¨¥ó¥È¥ê¤¬¸«¤Ä¤«¤Ã¤¿¤é¡¢¤½¤ÎºÇ½é¤Î¤â¤Î¤òÊÖ¤¹¡£ +関数 \fBgetfsspec\fP() は fstab ファイルを先頭から検索し、 \fIfs_spec\fP フィールドが \fIspecial_file\fP +引数にマッチするエントリが見つかったら、その最初のものを返す。 .LP -´Ø¿ô -.BR getfsfile () -¤Ï fstab ¥Õ¥¡¥¤¥ë¤òÀèƬ¤«¤é¸¡º÷¤·¡¢ -.I fs_file -¥Õ¥£¡¼¥ë¥É¤¬ -.I mount_point -°ú¿ô¤Ë¥Þ¥Ã¥Á¤¹¤ë¥¨¥ó¥È¥ê¤¬¸«¤Ä¤«¤Ã¤¿¤é¡¢¤½¤ÎºÇ½é¤Î¤â¤Î¤òÊÖ¤¹¡£ -.SH ÊÖ¤êÃÍ -À®¸ù¤¹¤ë¤È¡¢ -.BR getfsent (), -.BR getfsfile (), -.BR getfsspec () -¤Î³Æ´Ø¿ô¤Ï \fIfstab\fP ¹½Â¤ÂΤؤΥݥ¤¥ó¥¿¤òÊÖ¤·¡¢ -.BR setfsent () -´Ø¿ô¤Ï 1 ¤òÊÖ¤¹¡£ -¼ºÇÔ¤¹¤ë¤È¤³¤ì¤é¤Î´Ø¿ô¤Ï NULL ¤òÊÖ¤·¡¢ -end-of-file ¤Ë¤Ê¤Ã¤¿¤é 0 ¤òÊÖ¤¹¡£ -.\" .SH ÍúÎò +関数 \fBgetfsfile\fP() は fstab ファイルを先頭から検索し、 \fIfs_file\fP フィールドが \fImount_point\fP +引数にマッチするエントリが見つかったら、その最初のものを返す。 +.SH 返り値 +.\" .SH HISTORY +.\" The .\" .BR getfsent () -.\" ´Ø¿ô¤Ï 4.0BSD ¤ÇÅо줷¤¿¡£ -.\" ¾¤Î 4 ¤Ä¤Î´Ø¿ô¤Ï 4.3BSD ¤ÇÅо줷¤¿¡£ -.SH ½àµò -POSIX.1-2001 ¤Ë¤Ï¤³¤ì¤é¤Î´Ø¿ô¤Ï¸ºß¤·¤Ê¤¤¡£ -¤³¤ì¤é¤Î´Ø¿ô¤ò¤â¤Ä OS ¤Ï¤¤¤¯¤Ä¤«¤¢¤ê¡¢ -*BSD, SunOS, Digital UNIX, AIX Åù¤Ç¤¢¤ë -(AIX ¤Ë¤Ï -.BR getfstype () -¤â¤¢¤ë)¡£ -HP-UX ¤Ë¤âƱ̾¤Î´Ø¿ô·²¤¬¤¢¤ë¤¬¡¢ -HP-UX ¤Î¤â¤Î¤Ï \fIfstab\fP ¹½Â¤ÂΤǤϤʤ¯ \fIchecklist\fP ¹½Â¤ÂΤòÍѤ¤¤ë¡£ -¤Þ¤¿¤³¤ì¤é¤Î´Ø¿ô¤Î¸Æ¤Ó½Ð¤·¤Ï obsolete ¤Ç¡¢ -.BR getmntent (3) -¤Ë¼è¤Ã¤ÆÂå¤ï¤é¤ì¤Æ¤¤¤ë¡£ -.SH Ãí°Õ -¤³¤ì¤é¤Î´Ø¿ô¤Ï¥¹¥ì¥Ã¥É¥»¡¼¥Õ¤Ç¤Ï¤Ê¤¤¡£ +.\" function appeared in 4.0BSD; the other four functions appeared in 4.3BSD. +成功すると、 \fBgetfsent\fP(), \fBgetfsfile\fP(), \fBgetfsspec\fP() の各関数は \fIfstab\fP +構造体へのポインタを返し、 \fBsetfsent\fP() 関数は 1 を返す。 失敗するとこれらの関数は NULL を返し、 end\-of\-file +になったら 0 を返す。 +.SH 準拠 +POSIX.1\-2001 にはこれらの関数は存在しない。 これらの関数をもつ OS はいくつかあり、 例えば *BSD, SunOS, Digital +UNIX, AIX 等である (AIX には \fBgetfstype\fP() もある)。 HP\-UX にも同名の関数群があるが、 HP\-UX のものは +\fIfstab\fP 構造体ではなく \fIchecklist\fP 構造体を用いる。 またこれらの関数の呼び出しは obsolete で、 +\fBgetmntent\fP(3) に取って代わられている。 +.SH 注意 +これらの関数はスレッドセーフではない。 .LP -Linux ¤Ç¤Ï¥Ö¥í¥Ã¥¯¥¹¥Ú¥·¥ã¥ë¥Ç¥Ð¥¤¥¹¤òÊ£¿ô¤Î¾ì½ê¤Ë¥Þ¥¦¥ó¥È¤Ç¤­¡¢ -¤Þ¤¿Ê£¿ô¤Î¥Ç¥Ð¥¤¥¹¤¬Æ±¤¸¥Þ¥¦¥ó¥È¥Ý¥¤¥ó¥È¤ò¶¦Í­¤Ç¤­¤ë -(¤³¤Î¾ì¹ç¤Ï¤½¤Î¥Þ¥¦¥ó¥È¥Ý¥¤¥ó¥È¤ËºÇ¸å¤Ë¥Þ¥¦¥ó¥È¤µ¤ì¤¿¥Ç¥Ð¥¤¥¹¤¬°ÕÌ£¤ò»ý¤Ä) -¤¬¡¢ -.BR getfsfile () -¤È -.BR getfsspec () -¤Ï¥Þ¥Ã¥Á¤·¤¿ºÇ½é¤Î¥¨¥ó¥È¥ê¤·¤«ÊÖ¤µ¤Ê¤¤¤Î¤Ç¡¢ -¤³¤ì¤é¤Î 2 ¤Ä¤Î´Ø¿ô¤Ï Linux ¤Ç¤ÎÍøÍѤˤÏŬ¤·¤Æ¤¤¤Ê¤¤¡£ -.SH ´ØÏ¢¹àÌÜ -.BR getmntent (3), -.BR fstab (5) +Linux ではブロックスペシャルデバイスを複数の場所にマウントでき、 また複数のデバイスが同じマウントポイントを共有できる +(この場合はそのマウントポイントに最後にマウントされたデバイスが意味を持つ) が、 \fBgetfsfile\fP() と \fBgetfsspec\fP() +はマッチした最初のエントリしか返さないので、 これらの 2 つの関数は Linux での利用には適していない。 +.SH 関連項目 +\fBgetmntent\fP(3), \fBfstab\fP(5) +.SH この文書について +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.68 の一部 +である。プロジェクトの説明とバグ報告に関する情報は +http://www.kernel.org/doc/man\-pages/ に書かれている。