Commit | Line | Data |
---|---|---|
2f4571d9 KM |
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 | .\" | |
b467b8ca | 5 | .\" @(#)getfsent.3 6.4 (Berkeley) %G% |
2f4571d9 | 6 | .\" |
0609943c | 7 | .TH GETFSENT 3 "" |
2f4571d9 KM |
8 | .UC 4 |
9 | .SH NAME | |
b467b8ca | 10 | getfsent, getfsspec, getfsfile, setfsent, endfsent \- get file system descriptor file entry |
2f4571d9 KM |
11 | .SH SYNOPSIS |
12 | .nf | |
13 | .B #include <fstab.h> | |
14 | .PP | |
15 | .B struct fstab *getfsent() | |
16 | .PP | |
55cdef46 KM |
17 | .B struct fstab *getfsspec(spec) |
18 | .B char *spec; | |
2f4571d9 | 19 | .PP |
55cdef46 KM |
20 | .B struct fstab *getfsfile(file) |
21 | .B char *file; | |
2f4571d9 | 22 | .PP |
55cdef46 | 23 | .B int setfsent() |
2f4571d9 KM |
24 | .PP |
25 | .B int endfsent() | |
26 | .fi | |
27 | .SH DESCRIPTION | |
55cdef46 KM |
28 | .IR Getfsent , |
29 | .IR getfsspec , | |
2f4571d9 KM |
30 | and |
31 | .I getfsfile | |
55cdef46 | 32 | each return a pointer to an object with the following structure |
b467b8ca KB |
33 | containing the broken-out fields of a line in the file system |
34 | description file, | |
55cdef46 | 35 | .IR < fstab.h >. |
2f4571d9 KM |
36 | .RS |
37 | .PP | |
38 | .nf | |
9dbe8c98 | 39 | struct fstab { |
55cdef46 KM |
40 | char *fs_spec; |
41 | char *fs_file; | |
42 | char *fs_type; | |
2f4571d9 KM |
43 | int fs_freq; |
44 | int fs_passno; | |
45 | }; | |
46 | .ft R | |
47 | .ad | |
48 | .fi | |
49 | .RE | |
50 | .PP | |
51 | The fields have meanings described in | |
52 | .IR fstab (5). | |
53 | .PP | |
54 | .I Getfsent | |
55 | reads the next line of the file, opening the file if necessary. | |
56 | .PP | |
57 | .I Setfsent | |
58 | opens and rewinds the file. | |
59 | .PP | |
60 | .I Endfsent | |
61 | closes the file. | |
62 | .PP | |
63 | .I Getfsspec | |
64 | and | |
65 | .I getfsfile | |
55cdef46 | 66 | sequentially search from the beginning of the file until a matching |
b467b8ca KB |
67 | special file name or file system file name is found, or until EOF is |
68 | encountered. | |
69 | .PP | |
70 | Entries in the file with a type field equivalent to \fIFSTAB_XX\fP | |
71 | are ignored. | |
2f4571d9 KM |
72 | .SH FILES |
73 | /etc/fstab | |
74 | .SH "SEE ALSO" | |
75 | fstab(5) | |
76 | .SH DIAGNOSTICS | |
77 | Null pointer | |
78 | (0) returned on EOF or error. | |
79 | .SH BUGS | |
55cdef46 | 80 | All information is contained in a static area so it must be copied if it is |
2f4571d9 | 81 | to be saved. |