2 D header file correspoding to sys/statvfs.h.
4 Copyright: Copyright 2012 -
5 License: $(HTTP www.boost.org/LICENSE_1_0.txt, Boost License 1.0).
6 Authors: Robert Klotzner and $(HTTP jmdavisprog.com, Jonathan M Davis)
7 Standards: $(HTTP http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_statvfs.h.html,
8 The Open Group Base Specifications Issue 7 IEEE Std 1003.1, 2018 Edition)
10 module core.sys.posix.sys.statvfs;
11 private import core.stdc.config;
12 private import core.sys.posix.config;
13 public import core.sys.posix.sys.types;
20 version (CRuntime_Glibc) {
21 static if (__WORDSIZE == 32)
23 version=_STATVFSBUF_F_UNUSED;
36 version (_STATVFSBUF_F_UNUSED)
44 /* Definitions for the flag in `f_flag'. These definitions should be
45 kept in sync with the definitions in <sys/mount.h>. */
50 ST_RDONLY = 1, /* Mount read-only. */
52 ST_NODEV = 4, /* Disallow access to device special files. */
53 ST_NOEXEC = 8, /* Disallow program execution. */
54 ST_SYNCHRONOUS = 16, /* Writes are synced at once. */
55 ST_MANDLOCK = 64, /* Allow mandatory locks on an FS. */
56 ST_WRITE = 128, /* Write on file/directory/symlink. */
57 ST_APPEND = 256, /* Append-only file. */
58 ST_IMMUTABLE = 512, /* Immutable file. */
59 ST_NOATIME = 1024, /* Do not update access times. */
60 ST_NODIRATIME = 2048, /* Do not update directory access times. */
61 ST_RELATIME = 4096 /* Update atime relative to mtime/ctime. */
69 ST_RDONLY = 1, /* Mount read-only. */
74 static if ( __USE_FILE_OFFSET64 )
76 int statvfs64 (const char * file, statvfs_t* buf);
77 alias statvfs64 statvfs;
79 int fstatvfs64 (int fildes, statvfs_t *buf) @trusted;
80 alias fstatvfs64 fstatvfs;
84 int statvfs (const char * file, statvfs_t* buf);
85 int fstatvfs (int fildes, statvfs_t *buf);
91 enum _VFS_MNAMELEN = 1024;
92 enum _VFS_NAMELEN = 32;
122 char[_VFS_NAMELEN] f_fstypename = 0;
123 char[_VFS_MNAMELEN] f_mntonname = 0;
124 char[_VFS_MNAMELEN] f_mntfromname = 0;
129 ST_RDONLY = 1, /* Mount read-only. */
133 int statvfs (const char * file, statvfs_t* buf);
134 int fstatvfs (int fildes, statvfs_t *buf) @trusted;
136 else version (OpenBSD)
153 enum uint ST_RDONLY = 1;
154 enum uint ST_NOSUID = 2;
156 int statvfs (const char* file, statvfs_t* buf);
157 int fstatvfs (int fildes, statvfs_t* buf) @trusted;
159 else version (FreeBSD)
161 import core.sys.freebsd.sys.mount;
163 // @@@DEPRECATED_2.091@@@
164 deprecated("Moved to core.sys.freebsd.sys.mount to correspond to C header file sys/mount.h")
165 alias MFSNAMELEN = core.sys.freebsd.sys.mount.MFSNAMELEN;
167 // @@@DEPRECATED_2.091@@@
168 deprecated("Moved to core.sys.freebsd.sys.mount to correspond to C header file sys/mount.h")
169 alias MNAMELEN = core.sys.freebsd.sys.mount.MNAMELEN;
171 // @@@DEPRECATED_2.091@@@
172 deprecated("Moved to core.sys.freebsd.sys.mount to correspond to C header file sys/mount.h")
173 alias fsid_t = core.sys.freebsd.sys.mount.fsid_t;
175 // @@@DEPRECATED_2.091@@@
176 deprecated("Moved to core.sys.freebsd.sys.mount to correspond to C header file sys/mount.h")
177 alias statfs_t = core.sys.freebsd.sys.mount.statfs_t;
179 // @@@DEPRECATED_2.091@@@
180 deprecated("Values moved to core.sys.freebsd.sys.mount to correspond to C header file sys/mount.h")
183 // @@@DEPRECATED_2.091@@@
184 MNT_RDONLY = 1, /* read only filesystem */
186 // @@@DEPRECATED_2.091@@@
187 MNT_SYNCHRONOUS = 2, /* fs written synchronously */
189 // @@@DEPRECATED_2.091@@@
190 MNT_NOEXEC = 4, /* can't exec from filesystem */
192 // @@@DEPRECATED_2.091@@@
193 MNT_NOSUID = 8, /* don't honor setuid fs bits */
195 // @@@DEPRECATED_2.091@@@
196 MNT_NFS4ACLS = 16, /* enable NFS version 4 ACLs */
198 // @@@DEPRECATED_2.091@@@
199 MNT_UNION = 32, /* union with underlying fs */
201 // @@@DEPRECATED_2.091@@@
202 MNT_ASYNC = 64, /* fs written asynchronously */
204 // @@@DEPRECATED_2.091@@@
205 MNT_SUIDDIR = 128, /* special SUID dir handling */
207 // @@@DEPRECATED_2.091@@@
208 MNT_SOFTDEP = 256, /* using soft updates */
210 // @@@DEPRECATED_2.091@@@
211 MNT_NOSYMFOLLOW = 512, /* do not follow symlinks */
213 // @@@DEPRECATED_2.091@@@
214 MNT_GJOURNAL = 1024, /* GEOM journal support enabled */
216 // @@@DEPRECATED_2.091@@@
217 MNT_MULTILABEL = 2048, /* MAC support for objects */
219 // @@@DEPRECATED_2.091@@@
220 MNT_ACLS = 4096, /* ACL support enabled */
222 // @@@DEPRECATED_2.091@@@
223 MNT_NOATIME = 8192, /* dont update file access time */
225 // @@@DEPRECATED_2.091@@@
226 MNT_NOCLUSTERR = 16384, /* disable cluster read */
228 // @@@DEPRECATED_2.091@@@
229 MNT_NOCLUSTERW = 32768, /* disable cluster write */
231 // @@@DEPRECATED_2.091@@@
232 MNT_SUJ = 65536, /* using journaled soft updates */
234 // @@@DEPRECATED_2.091@@@
235 MNT_AUTOMOUNTED = 131072 /* mounted by automountd(8) */
238 deprecated("Moved to core.sys.freebsd.sys.mount to correspond to C header file sys/mount.h")
239 alias statfs = core.sys.freebsd.sys.mount.statfs;
241 deprecated("Moved to core.sys.freebsd.sys.mount to correspond to C header file sys/mount.h")
242 alias fstatfs = core.sys.freebsd.sys.mount.fstatfs;
259 enum uint ST_RDONLY = 0x1;
260 enum uint ST_NOSUID = 0x2;
262 int fstatvfs(int, statvfs_t*);
263 int statvfs(const char*, statvfs_t*);
284 ST_RDONLY = 1, /* Mount read-only. */
288 int statvfs (const char * file, statvfs_t* buf);
289 int fstatvfs (int fildes, statvfs_t *buf) @trusted;