1GETMNTINFO(3)              Library Functions Manual              GETMNTINFO(3)
2
3
4

NAME

6       getmntinfo - get information about mounted file systems
7

SYNOPSIS

9       #include <sys/param.h>
10       #include <sys/mount.h>
11
12       int
13       getmntinfo(mntbufp,flags)
14       struct statfs **mntbufp;
15       int flags
16

DESCRIPTION

18       The  getmntinfo()  function  returns  an  array  of  statfs  structures
19       describing each currently mounted file system (see statfs(2).
20
21       The getmntinfo() function passes its flags parameter  transparently  to
22       getfsstat(2).
23

RETURN VALUES

25       On successful completion, getmntinfo() returns a count of the number of
26       elements in the array.  The pointer to the array is  stored  into  mnt‐
27       bufp.
28
29       If an error occurs, zero is returned and the external variable errno is
30       set to indicate the error.  Although the pointer mntbufp will be unmod‐
31       ified,  any  information  previously  returned  by getmntinfo() will be
32       lost.
33

ERRORS

35       The getmntinfo() function may fail and set errno for any of the  errors
36       specified for the library routines getfsstat(2) or malloc(3).
37

SEE ALSO

39       getfsstat(2), statfs(2), mount(2), mount(8)
40

HISTORY

42       The getmntinfo() function first appeared in 4.4BSD.
43

BUGS

45       The getmntinfo() function writes the array of structures to an internal
46       static object and returns a pointer to that object. Subsequent calls to
47       getmntinfo() will modify the same object.
48
49       The  memory allocated by getmntinfo() cannot be free(2)'d by the appli‐
50       cation.
51
52
53
544.4 Berkeley Distribution      December 26, 1995                 GETMNTINFO(3)
Impressum