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;
123 char[_VFS_MNAMELEN] f_mntonname;
124 char[_VFS_MNAMELEN] f_mntfromname;
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 (FreeBSD)
138 import core.sys.freebsd.sys.mount;
140 // @@@DEPRECATED_2.091@@@
141 deprecated("Moved to core.sys.freebsd.sys.mount to correspond to C header file sys/mount.h")
142 alias MFSNAMELEN = core.sys.freebsd.sys.mount.MFSNAMELEN;
144 // @@@DEPRECATED_2.091@@@
145 deprecated("Moved to core.sys.freebsd.sys.mount to correspond to C header file sys/mount.h")
146 alias MNAMELEN = core.sys.freebsd.sys.mount.MNAMELEN;
148 // @@@DEPRECATED_2.091@@@
149 deprecated("Moved to core.sys.freebsd.sys.mount to correspond to C header file sys/mount.h")
150 alias fsid_t = core.sys.freebsd.sys.mount.fsid_t;
152 // @@@DEPRECATED_2.091@@@
153 deprecated("Moved to core.sys.freebsd.sys.mount to correspond to C header file sys/mount.h")
154 alias statfs_t = core.sys.freebsd.sys.mount.statfs_t;
156 // @@@DEPRECATED_2.091@@@
157 deprecated("Values moved to core.sys.freebsd.sys.mount to correspond to C header file sys/mount.h")
160 // @@@DEPRECATED_2.091@@@
161 MNT_RDONLY = 1, /* read only filesystem */
163 // @@@DEPRECATED_2.091@@@
164 MNT_SYNCHRONOUS = 2, /* fs written synchronously */
166 // @@@DEPRECATED_2.091@@@
167 MNT_NOEXEC = 4, /* can't exec from filesystem */
169 // @@@DEPRECATED_2.091@@@
170 MNT_NOSUID = 8, /* don't honor setuid fs bits */
172 // @@@DEPRECATED_2.091@@@
173 MNT_NFS4ACLS = 16, /* enable NFS version 4 ACLs */
175 // @@@DEPRECATED_2.091@@@
176 MNT_UNION = 32, /* union with underlying fs */
178 // @@@DEPRECATED_2.091@@@
179 MNT_ASYNC = 64, /* fs written asynchronously */
181 // @@@DEPRECATED_2.091@@@
182 MNT_SUIDDIR = 128, /* special SUID dir handling */
184 // @@@DEPRECATED_2.091@@@
185 MNT_SOFTDEP = 256, /* using soft updates */
187 // @@@DEPRECATED_2.091@@@
188 MNT_NOSYMFOLLOW = 512, /* do not follow symlinks */
190 // @@@DEPRECATED_2.091@@@
191 MNT_GJOURNAL = 1024, /* GEOM journal support enabled */
193 // @@@DEPRECATED_2.091@@@
194 MNT_MULTILABEL = 2048, /* MAC support for objects */
196 // @@@DEPRECATED_2.091@@@
197 MNT_ACLS = 4096, /* ACL support enabled */
199 // @@@DEPRECATED_2.091@@@
200 MNT_NOATIME = 8192, /* dont update file access time */
202 // @@@DEPRECATED_2.091@@@
203 MNT_NOCLUSTERR = 16384, /* disable cluster read */
205 // @@@DEPRECATED_2.091@@@
206 MNT_NOCLUSTERW = 32768, /* disable cluster write */
208 // @@@DEPRECATED_2.091@@@
209 MNT_SUJ = 65536, /* using journaled soft updates */
211 // @@@DEPRECATED_2.091@@@
212 MNT_AUTOMOUNTED = 131072 /* mounted by automountd(8) */
215 deprecated("Moved to core.sys.freebsd.sys.mount to correspond to C header file sys/mount.h")
216 alias statfs = core.sys.freebsd.sys.mount.statfs;
218 deprecated("Moved to core.sys.freebsd.sys.mount to correspond to C header file sys/mount.h")
219 alias fstatfs = core.sys.freebsd.sys.mount.fstatfs;
236 enum uint ST_RDONLY = 0x1;
237 enum uint ST_NOSUID = 0x2;
239 int fstatvfs(int, statvfs_t*);
240 int statvfs(const char*, statvfs_t*);
261 ST_RDONLY = 1, /* Mount read-only. */
265 int statvfs (const char * file, statvfs_t* buf);
266 int fstatvfs (int fildes, statvfs_t *buf) @trusted;