]> git.saurik.com Git - apple/libinfo.git/blobdiff - lookup.subproj/getfsent.3
Libinfo-324.tar.gz
[apple/libinfo.git] / lookup.subproj / getfsent.3
index a898b04d6dca8fb4da304ea3e6dc2d7a027bf510..299267b3eb68110fe759eb96101f45c2aebca32c 100644 (file)
@@ -9,10 +9,6 @@
 .\" 2. Redistributions in binary form must reproduce the above copyright
 .\"    notice, this list of conditions and the following disclaimer in the
 .\"    documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\"    must display the following acknowledgement:
-.\"    This product includes software developed by the University of
-.\"    California, Berkeley and its contributors.
 .\" 4. Neither the name of the University nor the names of its contributors
 .\"    may be used to endorse or promote products derived from this software
 .\"    without specific prior written permission.
@@ -30,9 +26,9 @@
 .\" SUCH DAMAGE.
 .\"
 .\"     @(#)getfsent.3 8.1 (Berkeley) 6/4/93
-.\" $FreeBSD: src/lib/libc/gen/getfsent.3,v 1.9 2001/10/01 16:08:51 ru Exp $
+.\" $FreeBSD: src/lib/libc/gen/getfsent.3,v 1.17 2007/01/09 00:27:53 imp Exp $
 .\"
-.Dd June 4, 1993
+.Dd April 7, 2003
 .Dt GETFSENT 3
 .Os
 .Sh NAME
 .Lb libc
 .Sh SYNOPSIS
 .In fstab.h
-.Ft struct fstab *
+.Ft "struct fstab *"
 .Fn getfsent void
-.Ft struct fstab *
+.Ft "struct fstab *"
 .Fn getfsspec "const char *spec"
-.Ft struct fstab *
+.Ft "struct fstab *"
 .Fn getfsfile "const char *file"
 .Ft int
 .Fn setfsent void
 .Ft void
 .Fn endfsent void
+.\".Ft void
+.\".Fn setfstab "const char *file"
+.\".Ft "const char *"
+.\".Fn getfstab void
 .Sh DESCRIPTION
 The
 .Fn getfsent ,
@@ -66,7 +66,7 @@ functions
 each return a pointer to an object with the following structure
 containing the broken-out fields of a line in the file system
 description file,
-.Aq Pa fstab.h .
+.In fstab.h .
 .Bd -literal -offset indent
 struct fstab {
        char    *fs_spec;       /* block special device name */
@@ -92,6 +92,18 @@ The
 .Fn endfsent
 function
 closes the file.
+.\".Pp
+.\"The
+.\".Fn setfstab
+.\"function sets the file to be used by subsequent operations.
+.\"The value set by
+.\".Fn setfstab
+.\"does not persist across calls to
+.\".Fn endfsent .
+.\".Pp
+.\"The
+.\".Fn getfstab
+.\"function returns the name of the file that will be used.
 .Pp
 The
 .Fn getfsspec
@@ -128,6 +140,20 @@ The
 .Fn endfsent
 function
 returns nothing.
+.\".Sh ENVIRONMENT
+.\".Bl -tag -width ".Ev PATH_FSTAB"
+.\".It Ev PATH_FSTAB
+.\"If the environment variable
+.\".Ev PATH_FSTAB
+.\"is set, all operations are performed against the specified file.
+.\".Ev PATH_FSTAB
+.\"will not be honored if the process environment or memory address space is
+.\"considered
+.\".Dq tainted .
+.\"(See
+.\".Xr issetugid 2
+.\"for more information.)
+.\".El
 .Sh FILES
 .Bl -tag -width /etc/fstab -compact
 .It Pa /etc/fstab
@@ -147,7 +173,17 @@ and
 .Fn setfsent
 functions appeared in
 .Bx 4.3 .
+.\".Bx 4.3 ;
+.\"the
+.\".Fn setfstab
+.\"and
+.\".Fn getfstab
+.\"functions appeared in
+.\".Fx 5.1 .
 .Sh BUGS
-These functions use static data storage;
-if the data is needed for future use, it should be
-copied before any subsequent calls overwrite it.
+The data space used by
+these functions is thread-specific; if future use requires the data, it should be
+copied before any subsequent calls to these functions overwrite it.
+.\"These functions use static data storage;
+.\"if the data is needed for future use, it should be
+.\"copied before any subsequent calls overwrite it.