]> git.saurik.com Git - apple/libc.git/blob - gen/FreeBSD/getmntinfo.3.patch
Libc-498.1.7.tar.gz
[apple/libc.git] / gen / FreeBSD / getmntinfo.3.patch
1 --- getmntinfo.3.orig 2008-04-28 16:25:33.000000000 -0700
2 +++ getmntinfo.3 2008-04-30 04:01:45.000000000 -0700
3 @@ -46,14 +46,26 @@
4 .In sys/mount.h
5 .Ft int
6 .Fn getmntinfo "struct statfs **mntbufp" "int flags"
7 +#ifdef UNIFDEF_LEGACY_64_APIS
8 +.Ft int
9 +.Fn getmntinfo64 "struct statfs64 **mntbufp" "int flags"
10 +#endif /* UNIFDEF_LEGACY_64_APIS */
11 .Sh DESCRIPTION
12 The
13 .Fn getmntinfo
14 function
15 returns an array of
16 -.Fn statfs
17 +.Ft statfs
18 structures describing each currently mounted file system (see
19 .Xr statfs 2 ) .
20 +#ifdef UNIFDEF_LEGACY_64_APIS
21 +Likewise, the
22 +.Fn getmntinfo64
23 +function
24 +returns an array of
25 +.Ft statfs64
26 +structures describing each currently mounted file system.
27 +#endif /* UNIFDEF_LEGACY_64_APIS */
28 .Pp
29 The
30 .Fn getmntinfo
31 @@ -61,11 +73,28 @@
32 passes its
33 .Fa flags
34 argument transparently to
35 +#ifdef UNIFDEF_LEGACY_64_APIS
36 +.Xr getfsstat 2 ,
37 +while the
38 +.Fn getmntinfo64
39 +function
40 +passes its
41 +.Fa flags
42 +argument transparently to
43 +.Fn getfsstat64 .
44 +#else /* !UNIFDEF_LEGACY_64_APIS */
45 .Xr getfsstat 2 .
46 +#endif /* UNIFDEF_LEGACY_64_APIS */
47 .Sh RETURN VALUES
48 On successful completion,
49 .Fn getmntinfo
50 +#ifdef UNIFDEF_LEGACY_64_APIS
51 +and
52 +.Fn getmntinfo64
53 +return a count of the number of elements in the array.
54 +#else /* !UNIFDEF_LEGACY_64_APIS */
55 returns a count of the number of elements in the array.
56 +#endif /* UNIFDEF_LEGACY_64_APIS */
57 The pointer to the array is stored into
58 .Fa mntbufp .
59 .Pp
60 @@ -76,11 +105,21 @@
61 .Fa mntbufp
62 will be unmodified, any information previously returned by
63 .Fn getmntinfo
64 +#ifdef UNIFDEF_LEGACY_64_APIS
65 +or
66 +.Fn getmntinfo64
67 +#endif /* UNIFDEF_LEGACY_64_APIS */
68 will be lost.
69 .Sh ERRORS
70 The
71 .Fn getmntinfo
72 +#ifdef UNIFDEF_LEGACY_64_APIS
73 +and
74 +.Fn getmntinfo64
75 +functions
76 +#else /* !UNIFDEF_LEGACY_64_APIS */
77 function
78 +#endif /* UNIFDEF_LEGACY_64_APIS */
79 may fail and set errno for any of the errors specified for the library
80 routines
81 .Xr getfsstat 2
82 @@ -99,15 +138,29 @@
83 .Sh BUGS
84 The
85 .Fn getmntinfo
86 -function writes the array of structures to an internal static object
87 +#ifdef UNIFDEF_LEGACY_64_APIS
88 +and
89 +.Fn getmntinfo64
90 +functions write the array of structures to an internal static object
91 +#else /* !UNIFDEF_LEGACY_64_APIS */
92 +function write the array of structures to an internal static object
93 +#endif /* UNIFDEF_LEGACY_64_APIS */
94 and returns
95 a pointer to that object.
96 Subsequent calls to
97 .Fn getmntinfo
98 +#ifdef UNIFDEF_LEGACY_64_APIS
99 +and
100 +.Fn getmntinfo64
101 +#endif /* UNIFDEF_LEGACY_64_APIS */
102 will modify the same object.
103 .Pp
104 The memory allocated by
105 .Fn getmntinfo
106 +#ifdef UNIFDEF_LEGACY_64_APIS
107 +and
108 +.Fn getmntinfo64
109 +#endif /* UNIFDEF_LEGACY_64_APIS */
110 cannot be
111 .Xr free 3 Ns 'd
112 by the application.