|
|
1.1 root 1: .\" Copyright (c) 1980 Regents of the University of California.
2: .\" All rights reserved. The Berkeley software License Agreement
3: .\" specifies the terms and conditions for redistribution.
4: .\"
5: .\" @(#)getfsent.3 6.3 (Berkeley) 5/12/86
6: .\"
7: .TH GETFSENT 3 "May 12, 1986"
8: .UC 4
9: .SH NAME
10: getfsent, getfsspec, getfsfile, getfstype, setfsent, endfsent \- get file system descriptor file entry
11: .SH SYNOPSIS
12: .nf
13: .B #include <fstab.h>
14: .PP
15: .B struct fstab *getfsent()
16: .PP
17: .B struct fstab *getfsspec(spec)
18: .B char *spec;
19: .PP
20: .B struct fstab *getfsfile(file)
21: .B char *file;
22: .PP
23: .B struct fstab *getfstype(type)
24: .B char *type;
25: .PP
26: .B int setfsent()
27: .PP
28: .B int endfsent()
29: .fi
30: .SH DESCRIPTION
31: .IR Getfsent ,
32: .IR getfsspec ,
33: .IR getfstype ,
34: and
35: .I getfsfile
36: each return a pointer to an object with the following structure
37: containing the broken-out fields of a line in the file system description file,
38: .IR < fstab.h >.
39: .RS
40: .PP
41: .nf
42: struct fstab {
43: char *fs_spec;
44: char *fs_file;
45: char *fs_type;
46: int fs_freq;
47: int fs_passno;
48: };
49: .ft R
50: .ad
51: .fi
52: .RE
53: .PP
54: The fields have meanings described in
55: .IR fstab (5).
56: .PP
57: .I Getfsent
58: reads the next line of the file, opening the file if necessary.
59: .PP
60: .I Setfsent
61: opens and rewinds the file.
62: .PP
63: .I Endfsent
64: closes the file.
65: .PP
66: .I Getfsspec
67: and
68: .I getfsfile
69: sequentially search from the beginning of the file until a matching
70: special file name or file system file name is found,
71: or until EOF is encountered.
72: .I Getfstype
73: does likewise, matching on the file system type field.
74: .SH FILES
75: /etc/fstab
76: .SH "SEE ALSO"
77: fstab(5)
78: .SH DIAGNOSTICS
79: Null pointer
80: (0) returned on EOF or error.
81: .SH BUGS
82: All information is contained in a static area so it must be copied if it is
83: to be saved.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.