home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 8
/
FreshFishVol8-CD1.bin
/
gnu
/
man
/
cat3
/
getfsent.0
< prev
next >
Wrap
Text File
|
1993-12-07
|
3KB
|
133 lines
GETFSENT(3) UNIX Programmer's Manual GETFSENT(3)
NNAAMMEE
ggeettffsseenntt, ggeettffssssppeecc, ggeettffssffiillee, sseettffsseenntt, eennddffsseenntt - get file system de
scriptor file entry
SSYYNNOOPPSSIISS
##iinncclluuddee <<ffssttaabb..hh>>
_f_s_t_a_b _*
ggeettffsseenntt(_v_o_i_d)
_s_t_r_u_c_t _f_s_t_a_b _*
ggeettffssssppeecc(_c_o_n_s_t _c_h_a_r _*_s_p_e_c)
_s_t_r_u_c_t _f_s_t_a_b _*
ggeettffssffiillee(_c_o_n_s_t _c_h_a_r _*_f_i_l_e)
_i_n_t
sseettffsseenntt(_v_o_i_d)
_v_o_i_d
eennddffsseenntt(_v_o_i_d)
DDEESSCCRRIIPPTTIIOONN
The ggeettffsseenntt(), ggeettffssssppeecc(), and ggeettffssffiillee() 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, <_f_s_t_a_b_._h>.
struct fstab {
char *fs_spec; /* block special device name */
char *fs_file; /* file system path prefix */
char *fs_vfstype; /* type of file system */
char *fs_mntops; /* comma separated mount options */
char *fs_type; /* rw, ro, sw, or xx */
int fs_freq; /* dump frequency, in days */
int fs_passno; /* pass number on parallel dump */
};
The fields have meanings described in fstab(5).
The sseettffsseenntt() function opens the file (closing any previously opened
file) or rewinds it if it is already open.
The eennddffsseenntt() function closes the file.
The ggeettffssssppeecc() and ggeettffssffiillee() functions search the entire file (opening
it if necessary) for a matching special file name or file system file
name.
For programs wishing to read the entire database, ggeettffsseenntt() reads the
next entry (opening the file if necessary).
All entries in the file with a type field equivalent to FSTAB_XX are ig
nored.
RREETTUURRNN VVAALLUUEESS
The ggeettffsseenntt(), ggeettffssssppeecc(), and ggeettffssffiillee() functions return a null
pointer (0) on EOF or error. The sseettffsseenntt() function returns 0 on fail
ure, 1 on success. The eennddffsseenntt() function returns nothing.
FFIILLEESS
/etc/fstab
SSEEEE AALLSSOO
fstab(5)
HHIISSTTOORRYY
The ggeettffsseenntt() function appeared in 4.0BSD; the eennddffsseenntt(), ggeettffssffiillee(),
ggeettffssssppeecc(), and sseettffsseenntt() functions appeared in 4.3BSD.
BBUUGGSS
These functions use static data storage; if the data is needed for future
use, it should be copied before any subsequent calls overwrite it.
4th Berkeley Distribution April 19, 1991 2