1 .\" Copyright (C) 2002 Andries Brouwer (aeb@cwi.nl)
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date. The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein. The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
23 .\" Inspired by a page written by Walter Harms.
25 .\" Japanese Version Copyright (c) 2002 NAKANO Takeo all rights reserved.
26 .\" Translated Wed 7 Aug 2002 by NAKANO Takeo <nakano@apm.seikei.ac.jp>
28 .TH GETFSENT 3 2002-02-28 "Linux" "Linux Programmer's Manual"
30 getfsent, getfsspec, getfsfile, setfsent, endfsent \- fstab エントリの処理
34 .B "void endfsent(void);"
36 .B "struct fstab *getfsent(void);"
38 .BI "struct fstab *getfsfile(const char *" mount_point );
40 .BI "struct fstab *getfsspec(const char *" special_file );
42 .B "int setfsent(void);"
46 ファイルから情報を読み込む。\fIfstab\fP 構造体は次のように定義されている。
51 char *fs_spec; /* block device name */
52 char *fs_file; /* mount point */
53 char *fs_vfstype; /* file-system type */
54 char *fs_mntops; /* mount options */
55 const char *fs_type; /* rw/rq/ro/sw/xx option */
56 int fs_freq; /* dump frequency, in days */
57 int fs_passno; /* pass number on parallel dump */
65 "rw", "rq", "ro", "sw", "xx"
67 (それぞれ read-write, quota 付き read-write, read-only, swap, ignore)。
71 は呼び出されると fstab ファイルをオープンし、
76 は fstab ファイルから次の行をパースする
81 は呼び出されると fstab ファイルをクローズする。
89 引数にマッチするエントリが見つかったら、その最初のものを返す。
97 引数にマッチするエントリが見つかったら、その最初のものを返す。
103 の各関数は \fIfstab\fP 構造体へのポインタを返し、
106 失敗するとこれらの関数は NULL を返し、
107 end-of-file になったら 0 を返す。
110 .\" 関数は 4.0BSD で登場した。
111 .\" 他の 4 つの関数は 4.3BSD で登場した。
113 POSIX.1-2001 にはこれらの関数は存在しない。
114 これらの関数をもつ OS はいくつかあり、
115 *BSD, SunOS, Digital UNIX, AIX 等である
120 HP-UX のものは \fIfstab\fP 構造体ではなく \fIchecklist\fP 構造体を用いる。
121 またこれらの関数の呼び出しは obsolete で、
127 Linux ではブロックスペシャルデバイスを複数の場所にマウントでき、
128 また複数のデバイスが同じマウントポイントを共有できる
129 (この場合はそのマウントポイントに最後にマウントされたデバイスが意味を持つ)
134 はマッチした最初のエントリしか返さないので、
135 これらの 2 つの関数は Linux での利用には適していない。