AT&T free version, from Michael Rendell (michael@stretch.cs.mun.ca)
[unix-history] / usr / src / lib / libc / gen / getmntinfo.3
CommitLineData
7241dcec
KM
1.\" Copyright (c) 1989 The Regents of the University of California.
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms are permitted
5.\" provided that the above copyright notice and this paragraph are
6.\" duplicated in all such forms and that any documentation,
7.\" advertising materials, and other materials related to such
8.\" distribution and use acknowledge that the software was developed
9.\" by the University of California, Berkeley. The name of the
10.\" University may not be used to endorse or promote products derived
11.\" from this software without specific prior written permission.
12.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
13.\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
14.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
15.\"
16.\" @(#)getmntinfo.3 6.1 (Berkeley) %G%
17.\"
18.TH GETMNTINFO 3 ""
19.UC 7
20.SH NAME
21getmntinfo - get information about mounted file systems
22.SH SYNOPSIS
23.nf
24.ft B
25#include <sys/types.h>
26#include <sys/mount.h>
27.LP
28.ft B
29int getmntinfo(mntbufp)
30struct statfs **mntbufp;
31.fi
32.ft R
33.SH DESCRIPTION
34.I Getmntinfo
35returns an array of
36.I statfs
37structures describing each currently mounted file system (see
38.IR statfs (2)).
39.SH DIAGNOSTICS
40On successful completion,
41.I getmntinfo
42returns a count of the number of elements in the array.
43The pointer to the array is stored into
44.IR mntbufp .
45Otherwise, zero is returned and
46.I mntbufp
47is unmodified.
48.SH BUGS
49All information is contained in a static area,
50so it must be copied if it is to be saved.
51.SH SEE ALSO
52getfsstat(2), statfs(2), mount(2), mount(8)