BSD 4_4 development
[unix-history] / usr / share / man / cat3 / getmntinfo.0
GETMNTINFO(3) BSD Programmer's Manual GETMNTINFO(3)
N\bNA\bAM\bME\bE
g\bge\bet\btm\bmn\bnt\bti\bin\bnf\bfo\bo - get information about mounted file systems
S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
#\b#i\bin\bnc\bcl\blu\bud\bde\be <\b<s\bsy\bys\bs/\b/p\bpa\bar\bra\bam\bm.\b.h\bh>\b>
#\b#i\bin\bnc\bcl\blu\bud\bde\be <\b<s\bsy\bys\bs/\b/u\buc\bcr\bre\bed\bd.\b.h\bh>\b>
#\b#i\bin\bnc\bcl\blu\bud\bde\be <\b<s\bsy\bys\bs/\b/m\bmo\bou\bun\bnt\bt.\b.h\bh>\b>
_\bi_\bn_\bt
g\bge\bet\btm\bmn\bnt\bti\bin\bnf\bfo\bo(_\bs_\bt_\br_\bu_\bc_\bt _\bs_\bt_\ba_\bt_\bf_\bs _\b*_\b*_\bm_\bn_\bt_\bb_\bu_\bf_\bp, _\bi_\bn_\bt _\bf_\bl_\ba_\bg_\bs);
D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
The g\bge\bet\btm\bmn\bnt\bti\bin\bnf\bfo\bo() function returns an array of statfs structures describ-
ing each currently mounted file system (see statfs(2)).
The g\bge\bet\btm\bmn\bnt\bti\bin\bnf\bfo\bo() function passes its _\bf_\bl_\ba_\bg_\bs parameter transparently to
getfsstat(2).
R\bRE\bET\bTU\bUR\bRN\bN V\bVA\bAL\bLU\bUE\bES\bS
On successful completion, g\bge\bet\btm\bmn\bnt\bti\bin\bnf\bfo\bo() returns a count of the number of
elements in the array. The pointer to the array is stored into _\bm_\bn_\bt_\bb_\bu_\bf_\bp.
If an error occurs, zero is returned and the external variable _\be_\br_\br_\bn_\bo is
set to indicate the error. Although the pointer _\bm_\bn_\bt_\bb_\bu_\bf_\bp will be unmodi-
fied, any information previously returned by g\bge\bet\btm\bmn\bnt\bti\bin\bnf\bfo\bo() will be lost.
E\bER\bRR\bRO\bOR\bRS\bS
The g\bge\bet\btm\bmn\bnt\bti\bin\bnf\bfo\bo() function may fail and set errno for any of the errors
specified for the library routines getfsstat(2) or malloc(3).
S\bSE\bEE\bE A\bAL\bLS\bSO\bO
getfsstat(2), statfs(2), mount(2), mount(8)
H\bHI\bIS\bST\bTO\bOR\bRY\bY
The g\bge\bet\btm\bmn\bnt\bti\bin\bnf\bfo\bo() function first appeared in 4.4BSD.
B\bBU\bUG\bGS\bS
The g\bge\bet\btm\bmn\bnt\bti\bin\bnf\bfo\bo() function writes the array of structures to an internal
static object and returns a pointer to that object. Subsequent calls to
g\bge\bet\btm\bmn\bnt\bti\bin\bnf\bfo\bo() will modify the same object.
The memory allocated by g\bge\bet\btm\bmn\bnt\bti\bin\bnf\bfo\bo() cannot be free(2)'d by the applica-
tion.
4.4BSD June 9, 1993 1