]> gitweb.factorcode.org Git - factor.git/blob - basis/unix/statfs/freebsd/freebsd.factor
Merge qualified, alias, symbols, constants into core
[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 ;
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 C-STRUCT: statfs
11     { "uint32_t" "f_version" }
12     { "uint32_t" "f_type" }
13     { "uint64_t" "f_flags" }
14     { "uint64_t" "f_bsize" }
15     { "uint64_t" "f_iosize" }
16     { "uint64_t" "f_blocks" }
17     { "uint64_t" "f_bfree" }
18     { "int64_t"  "f_bavail" }
19     { "uint64_t" "f_files" }
20     { "int64_t"  "f_ffree" }
21     { "uint64_t" "f_syncwrites" }
22     { "uint64_t" "f_asyncwrites" }
23     { "uint64_t" "f_syncreads" }
24     { "uint64_t" "f_asyncreads" }
25     { { "uint64_t" 10 } "f_spare" }
26     { "uint32_t" "f_namemax" }
27     { "uid_t"    "f_owner" }
28     { "fsid_t"   "f_fsid" }
29     { { "char" 80 } "f_charspare" }
30     { { "char" MFSNAMELEN } "f_fstypename" }
31     { { "char" MNAMELEN } "f_mntfromname" }
32     { { "char" MNAMELEN } "f_mntonname" } ;
33
34 FUNCTION: int statfs ( char* path, statvfs* buf ) ;