Skip to content
This repository was archived by the owner on Feb 8, 2024. It is now read-only.

Commit 5012046

Browse files
committed
Deprecate FreeBSD declarations from statvfs that belong in mount.
1 parent 7b1b355 commit 5012046

File tree

1 file changed

+82
-41
lines changed

1 file changed

+82
-41
lines changed

Diff for: src/core/sys/posix/sys/statvfs.d

+82-41
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
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.
93
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+
+/
109
module core.sys.posix.sys.statvfs;
1110
private import core.stdc.config;
1211
private import core.sys.posix.config;
@@ -135,64 +134,106 @@ else version(NetBSD)
135134
}
136135
else version (FreeBSD)
137136
{
138-
enum MFSNAMELEN = 16;
139-
enum MNAMELEN = 88;
137+
import core.sys.freebsd.sys.mount;
140138

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;
145142

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;
171150

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")
172157
enum FFlag
173158
{
159+
// @@@DEPRECATED_2.091@@@
160+
deprecated("Moved to core.sys.freebsd.sys.mount to correspond to C header file sys/mount.h")
174161
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")
175165
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")
176169
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")
177173
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")
178177
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")
179181
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")
180185
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")
181189
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")
182193
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")
183197
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")
184201
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")
185205
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")
186209
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")
187213
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")
188217
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")
189221
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")
190225
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")
191229
MNT_AUTOMOUNTED = 131072 /* mounted by automountd(8) */
192230
}
193231

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;
196237
}
197238
else
198239
{

0 commit comments

Comments
 (0)