*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->OpenBSD man pages -> getmntinfo (3)              



NAME    [Toc]    [Back]

     getmntinfo - get information about mounted file systems

SYNOPSIS    [Toc]    [Back]

     #include <sys/param.h>
     #include <sys/mount.h>

     getmntinfo(struct statfs **mntbufp, int flags);

DESCRIPTION    [Toc]    [Back]

     The getmntinfo() function returns an array of statfs  structures describing
 each currently mounted file system (see statfs(2)).

     The  getmntinfo() function passes its flags parameter transparently to

RETURN VALUES    [Toc]    [Back]

     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.

ERRORS    [Toc]    [Back]

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

SEE ALSO    [Toc]    [Back]

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

HISTORY    [Toc]    [Back]

     The getmntinfo() function first appeared in 4.4BSD.

BUGS    [Toc]    [Back]

     The  getmntinfo() function writes the array of structures to
an internal
     static object and returns a pointer to that object.   Subsequent calls to
     getmntinfo() will modify the same object.

     The  memory allocated by getmntinfo() cannot be free(3)'d by
the application.

OpenBSD      3.6                           June      9,      1993
[ Back ]
 Similar pages
Name OS Title
fstab Tru64 Static information about mounted file systems
getfsstat NetBSD get list of all mounted file systems
getfsstat OpenBSD get list of all mounted file systems
getfsstat Tru64 Get a list of all mounted file systems
getfsstat FreeBSD get list of all mounted file systems
mountdtab Tru64 Table of local file systems mounted by remote NFS clients
pfs_fstab HP-UX static file system mounting table, mounted file systems table
fstab HP-UX static information about the file systems
fstab FreeBSD static information about the file systems
getacl HP-UX get access control list (ACL) information (HFS File Systems only)
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service