]> gitweb.factorcode.org Git - factor.git/blob - basis/unix/statvfs/linux/linux.factor
bda1eb9605f2fbbd8f8830f8d8f7d937ce5ef7cd
[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.c-types alien.syntax classes.struct unix.types ;
4 IN: unix.statvfs.linux
5
6 STRUCT: statvfs64
7     { f_bsize ulong }
8     { f_frsize ulong }
9     { f_blocks __fsblkcnt64_t }
10     { f_bfree __fsblkcnt64_t }
11     { f_bavail __fsblkcnt64_t }
12     { f_files __fsfilcnt64_t }
13     { f_ffree __fsfilcnt64_t }
14     { f_favail __fsfilcnt64_t }
15     { f_fsid ulong }
16     { f_flag ulong }
17     { f_namemax ulong }
18     { __f_spare int[6] } ;
19
20 FUNCTION: int statvfs64 ( c-string 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.