GETFSENT(3) BSD Programmer's Manual GETFSENT(3)
g
\bge
\bet
\btf
\bfs
\bse
\ben
\bnt
\bt, g
\bge
\bet
\btf
\bfs
\bss
\bsp
\bpe
\bec
\bc, g
\bge
\bet
\btf
\bfs
\bsf
\bfi
\bil
\ble
\be, s
\bse
\bet
\btf
\bfs
\bse
\ben
\bnt
\bt, e
\ben
\bnd
\bdf
\bfs
\bse
\ben
\bnt
\bt - get file system de-
S
\bSY
\bYN
\bNO
\bOP
\bPS
\bSI
\bIS
\bS
#
\b#i
\bin
\bnc
\bcl
\blu
\bud
\bde
\be <
\b<f
\bfs
\bst
\bta
\bab
\bb.
\b.h
\bh>
\b>
_
\bf_
\bs_
\bt_
\ba_
\bb _
\b*
g
\bge
\bet
\btf
\bfs
\bse
\ben
\bnt
\bt(_
\bv_
\bo_
\bi_
\bd);
_
\bs_
\bt_
\br_
\bu_
\bc_
\bt _
\bf_
\bs_
\bt_
\ba_
\bb _
\b*
g
\bge
\bet
\btf
\bfs
\bss
\bsp
\bpe
\bec
\bc(_
\bc_
\bo_
\bn_
\bs_
\bt _
\bc_
\bh_
\ba_
\br _
\b*_
\bs_
\bp_
\be_
\bc);
_
\bs_
\bt_
\br_
\bu_
\bc_
\bt _
\bf_
\bs_
\bt_
\ba_
\bb _
\b*
g
\bge
\bet
\btf
\bfs
\bsf
\bfi
\bil
\ble
\be(_
\bc_
\bo_
\bn_
\bs_
\bt _
\bc_
\bh_
\ba_
\br _
\b*_
\bf_
\bi_
\bl_
\be);
s
\bse
\bet
\btf
\bfs
\bse
\ben
\bnt
\bt(_
\bv_
\bo_
\bi_
\bd);
e
\ben
\bnd
\bdf
\bfs
\bse
\ben
\bnt
\bt(_
\bv_
\bo_
\bi_
\bd);
D
\bDE
\bES
\bSC
\bCR
\bRI
\bIP
\bPT
\bTI
\bIO
\bON
\bN
The g
\bge
\bet
\btf
\bfs
\bse
\ben
\bnt
\bt(), g
\bge
\bet
\btf
\bfs
\bss
\bsp
\bpe
\bec
\bc(), and g
\bge
\bet
\btf
\bfs
\bsf
\bfi
\bil
\ble
\be() 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, <_
\bf_
\bs_
\bt_
\ba_
\bb_
\b._
\bh>.
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 s
\bse
\bet
\btf
\bfs
\bse
\ben
\bnt
\bt() function opens the file (closing any previously opened
file) or rewinds it if it is already open.
The e
\ben
\bnd
\bdf
\bfs
\bse
\ben
\bnt
\bt() function closes the file.
The g
\bge
\bet
\btf
\bfs
\bss
\bsp
\bpe
\bec
\bc() and g
\bge
\bet
\btf
\bfs
\bsf
\bfi
\bil
\ble
\be() functions search the entire file (opening
it if necessary) for a matching special file name or file system file
For programs wishing to read the entire database, g
\bge
\bet
\btf
\bfs
\bse
\ben
\bnt
\bt() reads the
next entry (opening the file if necessary).
All entries in the file with a type field equivalent to FSTAB_XX are ig-
R
\bRE
\bET
\bTU
\bUR
\bRN
\bN V
\bVA
\bAL
\bLU
\bUE
\bES
\bS
The g
\bge
\bet
\btf
\bfs
\bse
\ben
\bnt
\bt(), g
\bge
\bet
\btf
\bfs
\bss
\bsp
\bpe
\bec
\bc(), and g
\bge
\bet
\btf
\bfs
\bsf
\bfi
\bil
\ble
\be() functions return a null
pointer (0) on EOF or error. The s
\bse
\bet
\btf
\bfs
\bse
\ben
\bnt
\bt() function returns 0 on fail-
ure, 1 on success. The e
\ben
\bnd
\bdf
\bfs
\bse
\ben
\bnt
\bt() function returns nothing.
S
\bSE
\bEE
\bE A
\bAL
\bLS
\bSO
\bO
H
\bHI
\bIS
\bST
\bTO
\bOR
\bRY
\bY
The g
\bge
\bet
\btf
\bfs
\bse
\ben
\bnt
\bt() function appeared in 4.0BSD; the e
\ben
\bnd
\bdf
\bfs
\bse
\ben
\bnt
\bt(), g
\bge
\bet
\btf
\bfs
\bsf
\bfi
\bil
\ble
\be(),
g
\bge
\bet
\btf
\bfs
\bss
\bsp
\bpe
\bec
\bc(), and s
\bse
\bet
\btf
\bfs
\bse
\ben
\bnt
\bt() functions appeared in 4.3BSD.
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 June 4, 1993 2