]> gitweb.factorcode.org Git - factor.git/blob - basis/unix/statvfs/linux/linux.factor
Merge branch 'master' into experimental (untested!)
[factor.git] / basis / unix / statvfs / linux / linux.factor
1 ! Copyright (C) 2008 Doug Coleman.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: alien.syntax ;
4 IN: unix.statvfs.linux
5
6 C-STRUCT: statvfs64
7     { "ulong" "f_bsize" }
8     { "ulong" "f_frsize" }
9     { "__fsblkcnt64_t" "f_blocks" }
10     { "__fsblkcnt64_t" "f_bfree" }
11     { "__fsblkcnt64_t" "f_bavail" }
12     { "__fsfilcnt64_t" "f_files" }
13     { "__fsfilcnt64_t" "f_ffree" }
14     { "__fsfilcnt64_t" "f_favail" }
15     { "ulong" "f_fsid" }
16     { "ulong" "f_flag" }
17     { "ulong" "f_namemax" }
18     { { "int" 6 } "__f_spare" } ;
19
20 FUNCTION: int statvfs64 ( char* path, statvfs64* buf ) ;
21
22 : ST_RDONLY 1 ; inline        ! Mount read-only.
23 : ST_NOSUID 2 ; inline        ! Ignore suid and sgid bits.
24 : ST_NODEV 4 ; inline         ! Disallow access to device special files.
25 : ST_NOEXEC 8 ; inline        ! Disallow program execution.
26 : ST_SYNCHRONOUS 16 ; inline  ! Writes are synced at once.
27 : ST_MANDLOCK 64 ; inline     ! Allow mandatory locks on an FS.
28 : ST_WRITE 128 ; inline       ! Write on file/directory/symlink.
29 : ST_APPEND 256 ; inline      ! Append-only file.
30 : ST_IMMUTABLE 512 ; inline   ! Immutable file.
31 : ST_NOATIME 1024 ; inline    ! Do not update access times.