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

Commit 5c01638

Browse files
committed
Add statvfs declarations to FreeBSD.
1 parent 5012046 commit 5c01638

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

src/core/sys/posix/sys/statvfs.d

+24-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
44
Copyright: Copyright 2012 -
55
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
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)
89
+/
910
module core.sys.posix.sys.statvfs;
1011
private import core.stdc.config;
@@ -234,6 +235,27 @@ else version (FreeBSD)
234235

235236
deprecated("Moved to core.sys.freebsd.sys.mount to correspond to C header file sys/mount.h")
236237
alias fstatfs = core.sys.freebsd.sys.mount.fstatfs;
238+
239+
struct statvfs_t
240+
{
241+
fsblkcnt_t f_bavail;
242+
fsblkcnt_t f_bfree;
243+
fsblkcnt_t f_blocks;
244+
fsfilcnt_t f_favail;
245+
fsfilcnt_t f_ffree;
246+
fsfilcnt_t f_files;
247+
ulong f_bsize;
248+
ulong f_flag;
249+
ulong f_frsize;
250+
ulong f_fsid;
251+
ulong f_namemax;
252+
}
253+
254+
enum uint ST_RDONLY = 0x1;
255+
enum uint ST_NOSUID = 0x2;
256+
257+
int fstatvfs(int, statvfs_t*);
258+
int statvfs(const char*, statvfs_t*);
237259
}
238260
else
239261
{

0 commit comments

Comments
 (0)