1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
|
.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
.\"
.\" 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.
.\"
.\" Permission is granted to copy and distribute modified versions of this
.\" manual under the conditions for verbatim copying, provided that the
.\" entire resulting derived work is distributed under the terms of a
.\" permission notice identical to this one
.\"
.\" Since the Linux kernel and libraries are constantly changing, this
.\" manual page may be incorrect or out-of-date. The author(s) assume no
.\" responsibility for errors or omissions, or for damages resulting from
.\" the use of the information contained herein. The author(s) may not
.\" have taken the same level of care in the production of this manual,
.\" which is licensed free of charge, as they might when working
.\" professionally.
.\"
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
.\"
.\" References consulted:
.\" Linux libc source code
.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
.\" 386BSD man pages
.\" Modified Sat Jul 24 21:46:57 1993 by Rik Faith (faith@cs.unc.edu)
.\" Modified 961109, aeb
.\"
.\" Japanese Version Copyright (c) 1998 NAKANO Takeo all rights reserved.
.\" Translated Fri Mar 1 1998 by NAKANO Takeo <nakano@apm.seikei.ac.jp>
.\" Updated Sun Sep 3 2000 by Kentaro Shirakata <argrath@ub32.org>
.\"
.TH GETMNTENT 3 "June 27, 1993" "" "Linux Programmer's Manual"
.SH ̾
getmntent, setmntent, addmntent, endmntent, hasmntopt \- ե륷ƥեΥȥ
.nf
.B #include <stdio.h>
.B #include <mntent.h>
.sp
.BI "FILE *setmntent(const char *" filename ", const char *" type );
.sp
.BI "struct mntent *getmntent(FILE *" filep );
.sp
.BI "int addmntent(FILE *" filep ", const struct mntent *" mnt );
.sp
.BI "int endmntent(FILE *" filep );
.sp
.BI "char *hasmntopt(const struct mntent *" mnt ", const char *" opt );
.fi
.SH
Υ롼ϥե륷ƥҤե \fI/etc/fstab\fP
ȥޥȤƤե륷ƥҤե
\fI/etc/mtab\fP ˥뤿Ѥ롣
.PP
.B setmntent()
ؿϥե륷ƥεҥե \fIfilename\fP ץơ
Υեݥ֤Υեݥ
.B getmntent()
ˤäѤ롣 \fItype\fP ᤹륢ǡ
.BR fopen (3)
\fImode\fP Ʊͤ뤳ȤǤ롣
.PP
.B getmntent()
ؿϥե륷ƥεҥե \fIfilep\fP 鿷Ԥ
߹ߡԤեɤʬ䤷Ƥ¤ΤؤΥݥ֤
ݥϥΥƥåΰؤƤꡢΰ
\fBgetmntent()\fP ˸ƤӽФȤ˾Ƥޤ
.PP
.B addmntent()
ؿ mntent ¤ \fImnt\fP ƤץƤե
\fIfilep\fP κǸɲä롣
.PP
.B endmntent()
ؿϥե륷ƥεҥե \fIfilep\fP Ĥ롣
.PP
.B hasmntopt()
ؿ mntent ¤ \fImnt\fP \fImnt_opts\fP ե (ʲ
) \fIopt\fP ˰פʬʸ뤫Ĵ٤롣
ͭʥޥȥץˤĤƤ \fI<mntent.h>\fP ȤΤȡ
.PP
\fImntent\fP ¤Τ \fI<mntent.h>\fP ǰʲΤ褦Ƥ롣
.sp
.RS
.nf
.ne 8
.ta 8n 16n 32n
struct mntent {
char *mnt_fsname; /* name of mounted file system */
char *mnt_dir; /* file system path prefix */
char *mnt_type; /* mount type (see mntent.h) */
char *mnt_opts; /* mount options (see mntent.h) */
int mnt_freq; /* dump frequency in days */
int mnt_passno; /* pass number on parallel fsck */
};
.ta
.fi
.RE
.SH ֤
\fBgetmntent()\fP ؿ mntent ¤ΤؤΥݥ֤Ԥ
NULL ֤
.PP
.\Baddmntent()\fP ؿ 0 ֤Ԥ 1 ֤
.PP
\fBendmntent()\fP ؿϤĤͤ 1 ֤
.PP
\fBhasmntopt()\fP ؿϡޥåʬʸؤΥɥ쥹֤
ޥåʤ NULL ֤
.SH ե
.nf
/etc/fstab ե륷ƥ൭ҥե
/etc/mtab ޥȤ줿ե륷ƥεҥե
.fi
.SH
SunOS 4.1.3
.SH
SysV ˤ \fBgetmntent()\fP ؿϤ뤬
ƤӽФ³ۤʤꡢ֤빽¤Τۤʤ롣
SysVǤ
.I /etc/mnttab
Ѥ롣
BSD 4.4 Digital Unix ˤ
\fBgetfsstat()\fP ƥॳΥåѴؿǤ
\fBgetmntinfo()\fP 롣
.SH Ϣ
.BR fopen (3),
.BR fstab (5)
|