]> gitweb.factorcode.org Git - factor.git/blob - basis/unix/statfs/freebsd/freebsd.factor
ae418e6eb469c09e5b5fcdd6147718fb9fa9eecd
[factor.git] / basis / unix / statfs / freebsd / freebsd.factor
1 ! Copyright (C) 2008 Doug Coleman.
2 ! See http://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        88            ! size of on/from name bufs
8 CONSTANT: STATFS_VERSION  HEX: 20030518 ! current version number 
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: int statfs ( char* path, statfs* buf ) ;