1 .\" Copyright (c) 1983, 1991, 1993
2 .\" The Regents of the University of California. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\" must display the following acknowledgement:
14 .\" This product includes software developed by the University of
15 .\" California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\" may be used to endorse or promote products derived from this software
18 .\" without specific prior written permission.
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .\" @(#)getfsent.3 8.1 (Berkeley) 6/4/93
44 .Nd get file system descriptor file entry
52 .Fn getfsspec "const char *spec"
54 .Fn getfsfile "const char *file"
60 .Fn setfstab "const char *file"
70 each return a pointer to an object with the following structure
71 containing the broken-out fields of a line in the file system
74 .Bd -literal -offset indent
76 char *fs_spec; /* block special device name */
77 char *fs_file; /* file system path prefix */
78 char *fs_vfstype; /* File system type, ufs, nfs */
79 char *fs_mntops; /* Mount options ala -o */
80 char *fs_type; /* FSTAB_* from fs_mntops */
81 int fs_freq; /* dump frequency, in days */
82 int fs_passno; /* pass number on parallel fsck */
86 The fields have meanings described in
92 opens the file (closing any previously opened file) or rewinds it
93 if it is already open.
102 function sets the file to be used by subsequent operations.
105 does not persist across calls to
110 function returns the name of the file that will be used.
117 search the entire file (opening it if necessary) for a matching special
118 file name or file system file name.
120 For programs wishing to read the entire database,
122 reads the next entry (opening the file if necessary).
124 All entries in the file with a type field equivalent to
142 returns 0 on failure, 1 on success.
148 .Bl -tag -width ".Ev PATH_FSTAB"
150 If the environment variable
152 is set, all operations are performed against the specified file.
154 will not be honored if the process environment or memory address space is
159 for more information.)
162 .Bl -tag -width /etc/fstab -compact
178 functions appeared in
184 functions appeared in
187 These functions use static data storage;
188 if the data is needed for future use, it should be
189 copied before any subsequent calls overwrite it.