]> git.saurik.com Git - apple/libc.git/blob - gen/FreeBSD/getmntinfo.3.patch
Libc-594.1.4.tar.gz
[apple/libc.git] / gen / FreeBSD / getmntinfo.3.patch
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
19 .In sys/mount.h
20 .Ft int
21 .Fn getmntinfo "struct statfs **mntbufp" "int flags"
22 +#ifdef UNIFDEF_LEGACY_64_APIS
23 +.Sh TRANSITIIONAL SYNOPSIS (NOW DEPRECATED)
24 +.Ft int
25 +.br
26 +.Fn getmntinfo64 "struct statfs64 **mntbufp" "int flags" ;
27 +#endif /* UNIFDEF_LEGACY_64_APIS */
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 ) .
37 .Pp
38 @@ -62,6 +66,33 @@
39 .Fa flags
40 argument transparently to
41 .Xr getfsstat 2 .
42 +#ifdef UNIFDEF_LEGACY_64_APIS
43 +.Pp
44 +Like
45 +.Xr getfsstat 2 ,
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.
68 +#endif /* UNIFDEF_LEGACY_64_APIS */
69 .Sh RETURN VALUES
70 On successful completion,
71 .Fn getmntinfo
72 @@ -86,6 +117,24 @@
73 .Xr getfsstat 2
74 or
75 .Xr malloc 3 .
76 +#ifdef UNIFDEF_LEGACY_64_APIS
77 +.Sh TRANSITIONAL DESCRIPTION (NOW DEPRECATED)
78 +The
79 +.Fn getmntinfo64
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.
93 +#endif /* UNIFDEF_LEGACY_64_APIS */
94 .Sh SEE ALSO
95 .Xr getfsstat 2 ,
96 .Xr mount 2 ,
97 @@ -99,15 +148,29 @@
98 .Sh BUGS
99 The
100 .Fn getmntinfo
101 +#ifdef UNIFDEF_LEGACY_64_APIS
102 +and
103 +.Fn getmntinfo64
104 +functions write the array of structures to an internal static object
105 +#else /* !UNIFDEF_LEGACY_64_APIS */
106 function writes the array of structures to an internal static object
107 +#endif /* UNIFDEF_LEGACY_64_APIS */
108 and returns
109 a pointer to that object.
110 Subsequent calls to
111 .Fn getmntinfo
112 +#ifdef UNIFDEF_LEGACY_64_APIS
113 +and
114 +.Fn getmntinfo64
115 +#endif /* UNIFDEF_LEGACY_64_APIS */
116 will modify the same object.
117 .Pp
118 The memory allocated by
119 .Fn getmntinfo
120 +#ifdef UNIFDEF_LEGACY_64_APIS
121 +and
122 +.Fn getmntinfo64
123 +#endif /* UNIFDEF_LEGACY_64_APIS */
124 cannot be
125 .Xr free 3 Ns 'd
126 by the application.