]> gitweb.factorcode.org Git - factor.git/blob - basis/unix/statfs/freebsd/freebsd.factor
Switch to https urls
[factor.git] / basis / unix / statfs / freebsd / freebsd.factor
1 ! Copyright (C) 2008 Doug Coleman.
2 ! See https://factorcode.org/license.txt for BSD license.
3 USING: alien.syntax alien.c-types unix.types unix.stat classes.struct ;
4 IN: unix.statfs.freebsd
5
6 CONSTANT: MFSNAMELEN      16            ! length of type name including null */
7 CONSTANT: MNAMELEN        1024            ! size of on/from name bufs
8 CONSTANT: STAFS_VERSION 0x20140518
9
10 STRUCT: statfs
11     { f_version __uint32_t }
12     { f_type __uint32_t }
13     { f_flags __uint64_t }
14     { f_bsize __uint64_t }
15     { f_iosize __uint64_t }
16     { f_blocks __uint64_t }
17     { f_bfree __uint64_t }
18     { f_bavail __int64_t }
19     { f_files __uint64_t }
20     { f_ffree __int64_t }
21     { f_syncwrites __uint64_t }
22     { f_asyncwrites __uint64_t }
23     { f_syncreads __uint64_t }
24     { f_asyncreads __uint64_t }
25     { f_spare __uint64_t[10] }
26     { f_namemax __uint32_t }
27     { f_owner uid_t }
28     { f_fsid fsid_t }
29     { f_charspare char[80] }
30     { f_fstypename { char MFSNAMELEN } }
31     { f_mntfromname { char MNAMELEN } }
32     { f_mntonname { char MNAMELEN } } ;
33
34 FUNCTION-ALIAS: statfs-func int statfs ( c-string path, statfs* buf ) 
35 CONSTANT: MNT_WAIT    1   ! synchronously wait for I/O to complete
36 CONSTANT: MNT_NOWAIT  2   ! start all I/O, but do not wait for it
37