]> git.saurik.com Git - apple/libc.git/blame - gen/FreeBSD/getmntinfo.3.patch
Libc-583.tar.gz
[apple/libc.git] / gen / FreeBSD / getmntinfo.3.patch
CommitLineData
34e8f829
A
1--- getmntinfo.3.orig 2008-05-13 13:37:51.000000000 -0700
2+++ getmntinfo.3 2008-05-15 19:58:50.000000000 -0700
3@@ -32,26 +32,30 @@
4 .\" @(#)getmntinfo.3 8.1 (Berkeley) 6/9/93
5 .\" $FreeBSD: src/lib/libc/gen/getmntinfo.3,v 1.12 2002/12/19 09:40:21 ru Exp $
6 .\"
7-.Dd June 9, 1993
8+.Dd May 15, 2008
9 .Dt GETMNTINFO 3
10 .Os
11 .Sh NAME
12 .Nm getmntinfo
13 .Nd get information about mounted file systems
14-.Sh LIBRARY
15-.Lb libc
16 .Sh SYNOPSIS
17 .In sys/param.h
18 .In sys/ucred.h
224c7076
A
19 .In sys/mount.h
20 .Ft int
21 .Fn getmntinfo "struct statfs **mntbufp" "int flags"
b5d655f7 22+#ifdef UNIFDEF_LEGACY_64_APIS
34e8f829 23+.Sh TRANSITIIONAL SYNOPSIS (NOW DEPRECATED)
224c7076 24+.Ft int
34e8f829
A
25+.br
26+.Fn getmntinfo64 "struct statfs64 **mntbufp" "int flags" ;
b5d655f7 27+#endif /* UNIFDEF_LEGACY_64_APIS */
224c7076
A
28 .Sh DESCRIPTION
29 The
30 .Fn getmntinfo
31 function
32 returns an array of
33-.Fn statfs
34+.Ft statfs
35 structures describing each currently mounted file system (see
36 .Xr statfs 2 ) .
224c7076 37 .Pp
34e8f829 38@@ -62,6 +66,33 @@
224c7076
A
39 .Fa flags
40 argument transparently to
34e8f829 41 .Xr getfsstat 2 .
b5d655f7 42+#ifdef UNIFDEF_LEGACY_64_APIS
34e8f829
A
43+.Pp
44+Like
224c7076 45+.Xr getfsstat 2 ,
34e8f829
A
46+when the macro
47+.Dv _DARWIN_FEATURE_64_BIT_INODE
48+is defined, the
49+.Ft ino_t
50+type will be 64-bits (force 64-bit inode mode by defining the
51+.Dv _DARWIN_USE_64_BIT_INODE
52+macro before including header files).
53+This will cause the symbol variant of
54+.Fn getmntinfo ,
55+with the
56+.Fa $INODE64
57+suffixes, to be automatically linked in.
58+In addition, the
59+.Ft statfs
60+structure will be the 64-bit inode version.
61+If
62+.Dv _DARWIN_USE_64_BIT_INODE
63+is not defined, both
64+.Fn getmntinfo
65+and the
66+.Ft statfs
67+structure will refer to the 32-bit inode versions.
b5d655f7 68+#endif /* UNIFDEF_LEGACY_64_APIS */
224c7076
A
69 .Sh RETURN VALUES
70 On successful completion,
71 .Fn getmntinfo
34e8f829
A
72@@ -86,6 +117,24 @@
73 .Xr getfsstat 2
74 or
75 .Xr malloc 3 .
b5d655f7 76+#ifdef UNIFDEF_LEGACY_64_APIS
34e8f829
A
77+.Sh TRANSITIONAL DESCRIPTION (NOW DEPRECATED)
78+The
224c7076 79+.Fn getmntinfo64
34e8f829
A
80+routine is equivalent to its corresponding non-64-suffixed routine,
81+when 64-bit inodes are in effect.
82+It was added before there was support for the symbol variants, and so is
83+now deprecated.
84+Instead of using it, set the
85+.Dv _DARWIN_USE_64_BIT_INODE
86+macro before including header files to force 64-bit inode support.
87+.Pp
88+The
89+.Ft statfs64
90+structure used by this deprecated routine is the same as the
91+.Ft statfs
92+structure when 64-bit inodes are in effect.
b5d655f7 93+#endif /* UNIFDEF_LEGACY_64_APIS */
34e8f829
A
94 .Sh SEE ALSO
95 .Xr getfsstat 2 ,
96 .Xr mount 2 ,
97@@ -99,15 +148,29 @@
224c7076
A
98 .Sh BUGS
99 The
100 .Fn getmntinfo
b5d655f7 101+#ifdef UNIFDEF_LEGACY_64_APIS
224c7076
A
102+and
103+.Fn getmntinfo64
104+functions write the array of structures to an internal static object
b5d655f7 105+#else /* !UNIFDEF_LEGACY_64_APIS */
34e8f829 106 function writes the array of structures to an internal static object
b5d655f7 107+#endif /* UNIFDEF_LEGACY_64_APIS */
224c7076
A
108 and returns
109 a pointer to that object.
110 Subsequent calls to
111 .Fn getmntinfo
b5d655f7 112+#ifdef UNIFDEF_LEGACY_64_APIS
224c7076
A
113+and
114+.Fn getmntinfo64
b5d655f7 115+#endif /* UNIFDEF_LEGACY_64_APIS */
224c7076
A
116 will modify the same object.
117 .Pp
118 The memory allocated by
119 .Fn getmntinfo
b5d655f7 120+#ifdef UNIFDEF_LEGACY_64_APIS
224c7076
A
121+and
122+.Fn getmntinfo64
b5d655f7 123+#endif /* UNIFDEF_LEGACY_64_APIS */
224c7076
A
124 cannot be
125 .Xr free 3 Ns 'd
126 by the application.