GETMNTINFO
Section: C Library Functions (3)
Index
Return to Main Contents
BSD mandoc
NAME
getmntinfo
- get information about mounted file systems
SYNOPSIS
Fd #include <sys/param.h>
Fd #include <sys/ucred.h>
Fd #include <sys/mount.h>
Ft int
Fn getmntinfo struct statfs **mntbufp int flags
DESCRIPTION
The
Fn getmntinfo
function
returns an array of
statfs
structures describing each currently mounted file system (see
statfs(2)).
The
Fn getmntinfo
function
passes its
Fa flags
parameter transparently to
getfsstat(2).
RETURN VALUES
On successful completion,
Fn getmntinfo
returns a count of the number of elements in the array.
The pointer to the array is stored into
Fa mntbufp .
If an error occurs, zero is returned and the external variable
errno
is set to indicate the error.
Although the pointer
Fa mntbufp
will be unmodified, any information previously returned by
Fn getmntinfo
will be lost.
ERRORS
The
Fn getmntinfo
function
may fail and set
errno
for any of the errors specified for the library routines
getfsstat(2)
or
malloc(3).
SEE ALSO
getfsstat(2),
statfs(2),
mount(2),
mount(8)
HISTORY
The
Fn getmntinfo
function first appeared in 4.4BSD.
BUGS
The
Fn getmntinfo
function writes the array of structures to an internal static object
and returns
a pointer to that object. Subsequent calls to
Fn getmntinfo
will modify the same object.
The memory allocated by
Fn getmntinfo
cannot be
free(2)Ns'd
by the application.
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- RETURN VALUES
-
- ERRORS
-
- SEE ALSO
-
- HISTORY
-
- BUGS
-
This document was created by
man2html,
using the manual pages.
Time: 15:52:54 GMT, January 15, 2023