|
1 |
| -/** |
2 |
| - * D header file for POSIX. |
3 |
| - * |
4 |
| - * Copyright: Copyright Robert Klotzner 2012 |
5 |
| - * License: $(HTTP www.boost.org/LICENSE_1_0.txt, Boost License 1.0). |
6 |
| - * Authors: Robert Klotzner |
7 |
| - * Standards: The Open Group Base Specifications Issue 6 IEEE Std 1003.1, 2004 Edition |
8 |
| - */ |
| 1 | +/++ |
| 2 | + D header file correspoding to sys/statvfs.h. |
9 | 3 |
|
| 4 | + Copyright: Copyright 2012 - |
| 5 | + License: $(HTTP www.boost.org/LICENSE_1_0.txt, Boost License 1.0). |
| 6 | + Authors: Robert Klotzner anh $(HTTP jmdavisprog.com, Jonathan M Davis) |
| 7 | + Standards: The Open Group Base Specifications Issue 6 IEEE Std 1003.1, 2004 Edition |
| 8 | + +/ |
10 | 9 | module core.sys.posix.sys.statvfs;
|
11 | 10 | private import core.stdc.config;
|
12 | 11 | private import core.sys.posix.config;
|
@@ -135,64 +134,106 @@ else version(NetBSD)
|
135 | 134 | }
|
136 | 135 | else version (FreeBSD)
|
137 | 136 | {
|
138 |
| - enum MFSNAMELEN = 16; |
139 |
| - enum MNAMELEN = 88; |
| 137 | + import core.sys.freebsd.sys.mount; |
140 | 138 |
|
141 |
| - struct fsid_t |
142 |
| - { |
143 |
| - int[2] __fsid_val; |
144 |
| - } |
| 139 | + // @@@DEPRECATED_2.091@@@ |
| 140 | + deprecated("Moved to core.sys.freebsd.sys.mount to correspond to C header file sys/mount.h") |
| 141 | + alias MFSNAMELEN = core.sys.freebsd.sys.mount.MFSNAMELEN; |
145 | 142 |
|
146 |
| - struct statfs_t |
147 |
| - { |
148 |
| - uint f_version; /* structure version number */ |
149 |
| - uint f_type; /* type of filesystem */ |
150 |
| - ulong f_flags; /* copy of mount exported flags */ |
151 |
| - ulong f_bsize; /* filesystem fragment size */ |
152 |
| - ulong f_iosize; /* optimal transfer block size */ |
153 |
| - ulong f_blocks; /* total data blocks in filesystem */ |
154 |
| - ulong f_bfree; /* free blocks in filesystem */ |
155 |
| - long f_bavail; /* free blocks avail to non-superuser */ |
156 |
| - ulong f_files; /* total file nodes in filesystem */ |
157 |
| - long f_ffree; /* free nodes avail to non-superuser */ |
158 |
| - ulong f_syncwrites; /* count of sync writes since mount */ |
159 |
| - ulong f_asyncwrites; /* count of async writes since mount */ |
160 |
| - ulong f_syncreads; /* count of sync reads since mount */ |
161 |
| - ulong f_asyncreads; /* count of async reads since mount */ |
162 |
| - ulong[10] f_spare; /* unused spare */ |
163 |
| - uint f_namemax; /* maximum filename length */ |
164 |
| - uint f_owner; /* user that mounted the filesystem */ |
165 |
| - fsid_t f_fsid; /* filesystem id */ |
166 |
| - char[80] f_charspare; /* spare string space */ |
167 |
| - char[MFSNAMELEN] f_fstypename; /* filesystem type name */ |
168 |
| - char[MNAMELEN] f_mntfromname; /* mounted filesystem */ |
169 |
| - char[MNAMELEN] f_mntonname; /* directory on which mounted */ |
170 |
| - } |
| 143 | + // @@@DEPRECATED_2.091@@@ |
| 144 | + deprecated("Moved to core.sys.freebsd.sys.mount to correspond to C header file sys/mount.h") |
| 145 | + alias MNAMELEN = core.sys.freebsd.sys.mount.MNAMELEN; |
| 146 | + |
| 147 | + // @@@DEPRECATED_2.091@@@ |
| 148 | + deprecated("Moved to core.sys.freebsd.sys.mount to correspond to C header file sys/mount.h") |
| 149 | + alias fsid_t = core.sys.freebsd.sys.mount.fsid_t; |
171 | 150 |
|
| 151 | + // @@@DEPRECATED_2.091@@@ |
| 152 | + deprecated("Moved to core.sys.freebsd.sys.mount to correspond to C header file sys/mount.h") |
| 153 | + alias statfs_t = core.sys.freebsd.sys.mount.statfs_t; |
| 154 | + |
| 155 | + // @@@DEPRECATED_2.091@@@ |
| 156 | + deprecated("Values moved to core.sys.freebsd.sys.mount to correspond to C header file sys/mount.h") |
172 | 157 | enum FFlag
|
173 | 158 | {
|
| 159 | + // @@@DEPRECATED_2.091@@@ |
| 160 | + deprecated("Moved to core.sys.freebsd.sys.mount to correspond to C header file sys/mount.h") |
174 | 161 | MNT_RDONLY = 1, /* read only filesystem */
|
| 162 | + |
| 163 | + // @@@DEPRECATED_2.091@@@ |
| 164 | + deprecated("Moved to core.sys.freebsd.sys.mount to correspond to C header file sys/mount.h") |
175 | 165 | MNT_SYNCHRONOUS = 2, /* fs written synchronously */
|
| 166 | + |
| 167 | + // @@@DEPRECATED_2.091@@@ |
| 168 | + deprecated("Moved to core.sys.freebsd.sys.mount to correspond to C header file sys/mount.h") |
176 | 169 | MNT_NOEXEC = 4, /* can't exec from filesystem */
|
| 170 | + |
| 171 | + // @@@DEPRECATED_2.091@@@ |
| 172 | + deprecated("Moved to core.sys.freebsd.sys.mount to correspond to C header file sys/mount.h") |
177 | 173 | MNT_NOSUID = 8, /* don't honor setuid fs bits */
|
| 174 | + |
| 175 | + // @@@DEPRECATED_2.091@@@ |
| 176 | + deprecated("Moved to core.sys.freebsd.sys.mount to correspond to C header file sys/mount.h") |
178 | 177 | MNT_NFS4ACLS = 16, /* enable NFS version 4 ACLs */
|
| 178 | + |
| 179 | + // @@@DEPRECATED_2.091@@@ |
| 180 | + deprecated("Moved to core.sys.freebsd.sys.mount to correspond to C header file sys/mount.h") |
179 | 181 | MNT_UNION = 32, /* union with underlying fs */
|
| 182 | + |
| 183 | + // @@@DEPRECATED_2.091@@@ |
| 184 | + deprecated("Moved to core.sys.freebsd.sys.mount to correspond to C header file sys/mount.h") |
180 | 185 | MNT_ASYNC = 64, /* fs written asynchronously */
|
| 186 | + |
| 187 | + // @@@DEPRECATED_2.091@@@ |
| 188 | + deprecated("Moved to core.sys.freebsd.sys.mount to correspond to C header file sys/mount.h") |
181 | 189 | MNT_SUIDDIR = 128, /* special SUID dir handling */
|
| 190 | + |
| 191 | + // @@@DEPRECATED_2.091@@@ |
| 192 | + deprecated("Moved to core.sys.freebsd.sys.mount to correspond to C header file sys/mount.h") |
182 | 193 | MNT_SOFTDEP = 256, /* using soft updates */
|
| 194 | + |
| 195 | + // @@@DEPRECATED_2.091@@@ |
| 196 | + deprecated("Moved to core.sys.freebsd.sys.mount to correspond to C header file sys/mount.h") |
183 | 197 | MNT_NOSYMFOLLOW = 512, /* do not follow symlinks */
|
| 198 | + |
| 199 | + // @@@DEPRECATED_2.091@@@ |
| 200 | + deprecated("Moved to core.sys.freebsd.sys.mount to correspond to C header file sys/mount.h") |
184 | 201 | MNT_GJOURNAL = 1024, /* GEOM journal support enabled */
|
| 202 | + |
| 203 | + // @@@DEPRECATED_2.091@@@ |
| 204 | + deprecated("Moved to core.sys.freebsd.sys.mount to correspond to C header file sys/mount.h") |
185 | 205 | MNT_MULTILABEL = 2048, /* MAC support for objects */
|
| 206 | + |
| 207 | + // @@@DEPRECATED_2.091@@@ |
| 208 | + deprecated("Moved to core.sys.freebsd.sys.mount to correspond to C header file sys/mount.h") |
186 | 209 | MNT_ACLS = 4096, /* ACL support enabled */
|
| 210 | + |
| 211 | + // @@@DEPRECATED_2.091@@@ |
| 212 | + deprecated("Moved to core.sys.freebsd.sys.mount to correspond to C header file sys/mount.h") |
187 | 213 | MNT_NOATIME = 8192, /* dont update file access time */
|
| 214 | + |
| 215 | + // @@@DEPRECATED_2.091@@@ |
| 216 | + deprecated("Moved to core.sys.freebsd.sys.mount to correspond to C header file sys/mount.h") |
188 | 217 | MNT_NOCLUSTERR = 16384, /* disable cluster read */
|
| 218 | + |
| 219 | + // @@@DEPRECATED_2.091@@@ |
| 220 | + deprecated("Moved to core.sys.freebsd.sys.mount to correspond to C header file sys/mount.h") |
189 | 221 | MNT_NOCLUSTERW = 32768, /* disable cluster write */
|
| 222 | + |
| 223 | + // @@@DEPRECATED_2.091@@@ |
| 224 | + deprecated("Moved to core.sys.freebsd.sys.mount to correspond to C header file sys/mount.h") |
190 | 225 | MNT_SUJ = 65536, /* using journaled soft updates */
|
| 226 | + |
| 227 | + // @@@DEPRECATED_2.091@@@ |
| 228 | + deprecated("Moved to core.sys.freebsd.sys.mount to correspond to C header file sys/mount.h") |
191 | 229 | MNT_AUTOMOUNTED = 131072 /* mounted by automountd(8) */
|
192 | 230 | }
|
193 | 231 |
|
194 |
| - int statfs(const char* file, statfs_t* buf); |
195 |
| - int fstatfs(int fildes, statfs_t* buf) @trusted; |
| 232 | + deprecated("Moved to core.sys.freebsd.sys.mount to correspond to C header file sys/mount.h") |
| 233 | + alias statfs = core.sys.freebsd.sys.mount.statfs; |
| 234 | + |
| 235 | + deprecated("Moved to core.sys.freebsd.sys.mount to correspond to C header file sys/mount.h") |
| 236 | + alias fstatfs = core.sys.freebsd.sys.mount.fstatfs; |
196 | 237 | }
|
197 | 238 | else
|
198 | 239 | {
|
|
0 commit comments