1 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
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 .\" References consulted:
24 .\" Linux libc source code
25 .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
27 .\" Modified Sat Jul 24 21:46:57 1993 by Rik Faith <faith@cs.unc.edu>
28 .\" Translated into german 05 August 1996 by Markus Kaufmann
29 .\" <markus.kaufmann@gmx.de>
31 .TH GETMNTENT 3 "6. Juni 1996" "" "Linux Bibliotheksfunktionen"
33 getmntent, setmntent, addmntent, endmntent, hasmntopt \- Lesen des
34 Dateieintrages des Dateisystemdeskriptors
38 .B #include <mntent.h>
40 .BI "FILE *setmntent(const char *" filep ", const char *" type );
42 .BI "struct mntent *getmntent(FILE *" filep );
44 .BI "int addmntent(FILE *" filep ", const struct mntent *" mnt );
46 .BI "int endmntent(FILE *" filep );
48 .BI "char *hasmntopt(const struct mntent *" mnt ", const char *" opt );
51 Diese Routinen werden benutzt, um auf die Dateien
53 die die Liste der Dateisysteme enthält und die Datei
55 die die Liste der zurzeit gemounteten Dateisysteme enthält, zuzugreifen.
58 .BR setmntent() -Funktion
59 öffnet die Dateisystembeschreibungsdatei
61 und liefert einen Dateizeiger zurück, der von
66 ist die Art des benötigten Zugriffs und kann die selben Werte annehmen
72 .BR getmntent() -Funktion
73 liest die nächste Zeile von der Dateisystembeschreibungsdatei
75 und liefert einen Zeiger auf Struktur zurück, die die einzelnen Felder der
76 gelesenen Zeile enthält.
77 Der Zeiger zeigt auf einen statischen Speicherbereich, der von den folgenden
78 .BR getmntent() -Aufrufen
79 wieder überschrieben wird.
82 .BR addmntent() -Funktion
83 fügt die mntent-Struktur
85 an das Ende der offenen Datei
89 .BR endmntent() -Funktion
90 schließt die Dateisystembeschreibungsdatei
94 .BR hasmntopt() -Funktion
100 nach einem Teilstring der auf
103 Gültige mount-Optionen sind unter
111 folgendermaßen definiert:
118 char *mnt_fsname; /* Name des gemounteten Dateisystems */
119 char *mnt_dir; /* Dateisystempfadprefix */
120 char *mnt_type; /* Mounttyp (siehe mntent.h) */
121 char *mnt_opts; /* Mount Optionen (siehe mntent.h) */
122 int mnt_freq; /* Dumphäufigkeit in Tagen */
123 int mnt_passno; /* Durchgangsnummer beim parallelen fsck */
130 .BR getmntent() -Funktion
131 liefert einen Pointer auf eine mntent-Struktur
132 zurück oder NULL bei einem Fehler.
135 .BR addmntent() -Funktion
136 liefert bei Erfolg eine 0 zurück, bei einem Fehler
140 .BR endmntent()- Funktion
141 liefert immer eine 1 zurück.
144 .BR hasmntopt() -Funktion
145 liefert die Adresse des Substrings oder NULL wenn er nicht gefunden
150 Dateisystembeschreibungsdatei
152 Enthält Liste der z.Zt. gemounteten Filesysteme