abort further processing of packet if length error detected in p_rr()
[unix-history] / usr / src / lib / libc / gen / getfsent.3
CommitLineData
12568253
KB
1.\" Copyright (c) 1983 The Regents of the University of California.
2.\" All rights reserved.
2f4571d9 3.\"
12568253
KB
4.\" Redistribution and use in source and binary forms are permitted
5.\" provided that the above copyright notice and this paragraph are
6.\" duplicated in all such forms and that any documentation,
7.\" advertising materials, and other materials related to such
8.\" distribution and use acknowledge that the software was developed
9.\" by the University of California, Berkeley. The name of the
10.\" University may not be used to endorse or promote products derived
11.\" from this software without specific prior written permission.
12.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
13.\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
14.\" WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
15.\"
1e24342d 16.\" @(#)getfsent.3 6.7 (Berkeley) %G%
2f4571d9 17.\"
0609943c 18.TH GETFSENT 3 ""
2f4571d9
KM
19.UC 4
20.SH NAME
b467b8ca 21getfsent, getfsspec, getfsfile, setfsent, endfsent \- get file system descriptor file entry
2f4571d9
KM
22.SH SYNOPSIS
23.nf
24.B #include <fstab.h>
25.PP
26.B struct fstab *getfsent()
27.PP
55cdef46
KM
28.B struct fstab *getfsspec(spec)
29.B char *spec;
2f4571d9 30.PP
55cdef46
KM
31.B struct fstab *getfsfile(file)
32.B char *file;
2f4571d9 33.PP
55cdef46 34.B int setfsent()
2f4571d9 35.PP
12568253 36.B void endfsent()
2f4571d9
KM
37.fi
38.SH DESCRIPTION
55cdef46
KM
39.IR Getfsent ,
40.IR getfsspec ,
2f4571d9
KM
41and
42.I getfsfile
55cdef46 43each return a pointer to an object with the following structure
b467b8ca
KB
44containing the broken-out fields of a line in the file system
45description file,
55cdef46 46.IR < fstab.h >.
2f4571d9
KM
47.RS
48.PP
49.nf
1e24342d 50.ta \w'#define 'u +\w'char\ \ 'u +\w'*fs_vfstype;\ \ 'u
9dbe8c98 51struct fstab {
1e24342d
KM
52 char *fs_spec; /* block special device name */
53 char *fs_file; /* file system path prefix */
54 char *fs_vfstype; /* type of file system */
55 char *fs_mntops; /* comma separated mount options */
56 char *fs_type; /* rw, ro, sw, or xx */
57 int fs_freq; /* dump frequency, in days */
58 int fs_passno; /* pass number on parallel dump */
2f4571d9
KM
59};
60.ft R
61.ad
62.fi
63.RE
64.PP
65The fields have meanings described in
66.IR fstab (5).
67.PP
2f4571d9 68.I Setfsent
62ab31a2
KB
69opens the file (closing any previously opened file) or rewinds it
70if it is already open.
2f4571d9
KM
71.PP
72.I Endfsent
73closes the file.
74.PP
75.I Getfsspec
76and
77.I getfsfile
62ab31a2
KB
78search the entire file (opening it if necessary) for a matching special
79file name or file system file name.
80.PP
81For programs wishing to read the entire database,
82.I getfsent
83reads the next entry (opening the file if necessary).
b467b8ca 84.PP
62ab31a2
KB
85All entries in the file with a type field equivalent to
86.I FSTAB_XX
b467b8ca 87are ignored.
2f4571d9
KM
88.SH FILES
89/etc/fstab
90.SH "SEE ALSO"
91fstab(5)
92.SH DIAGNOSTICS
12568253
KB
93.IR Getfsent ,
94.IR getfsspec ,
95and
96.I getfsfile
97return a null pointer (0) on EOF or error.
98.I Setfsent
62ab31a2 99returns 0 on failure, 1 on success.
12568253
KB
100.I Endfsent
101returns nothing.
2f4571d9 102.SH BUGS
55cdef46 103All information is contained in a static area so it must be copied if it is
2f4571d9 104to be saved.