]> gitweb.factorcode.org Git - factor.git/blob - basis/unix/statvfs/linux/linux.factor
Merge qualified, alias, symbols, constants into core
[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 CONSTANT: ST_RDONLY 1        ! Mount read-only.
23 CONSTANT: ST_NOSUID 2        ! Ignore suid and sgid bits.
24 CONSTANT: ST_NODEV 4         ! Disallow access to device special files.
25 CONSTANT: ST_NOEXEC 8        ! Disallow program execution.
26 CONSTANT: ST_SYNCHRONOUS 16  ! Writes are synced at once.
27 CONSTANT: ST_MANDLOCK 64     ! Allow mandatory locks on an FS.
28 CONSTANT: ST_WRITE 128       ! Write on file/directory/symlink.
29 CONSTANT: ST_APPEND 256      ! Append-only file.
30 CONSTANT: ST_IMMUTABLE 512   ! Immutable file.
31 CONSTANT: ST_NOATIME 1024    ! Do not update access times.