Copyright (c) 1989 The Regents of the University of California.
All rights reserved.
%sccs.include.redist.man%
@(#)getmntinfo.3 6.4 (Berkeley) 11/19/90
All rights reserved.
%sccs.include.redist.man%
@(#)getmntinfo.3 6.4 (Berkeley) 11/19/90
GETMNTINFO 3 ""
C 7 NAME
getmntinfo - get information about mounted file systems
SYNOPSIS
#include <sys/types.h> #include <sys/mount.h>int getmntinfo(mntbufp, flags) struct statfs **mntbufp; int flags
DESCRIPTION
Getmntinfo returns an array of
statfs structures describing each currently mounted file system (see
statfs (2)). Getmntinfo passes its flags parameter transparently to getfsstat (2).
"RETURN VALUE"
On successful completion,
getmntinfo returns a count of the number of elements in the array.
The pointer to the array is stored into
mntbufp . If an error occurs, zero is returned and the external variable errno is set to indicate the error. Although the pointer mntbufp will be unmodified, any information previously returned by getmntinfo will be lost.
BUGS
All information is contained in a static area,
so it must be copied if it is to be saved.
The memory allocated by getmntinfo cannot be free 'd by the application.
ERRORS
Getmntinfo 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)