1 #ifndef _SYS_STATVFS_H 2 #define _SYS_STATVFS_H 3 4 #ifdef __cplusplus 5 extern "C" { 6 #endif 7 8 #include <sys/features.h> 9 #include <sys/types.h> 10 11 struct statvfs { 12 unsigned long f_bsize, f_frsize; 13 fsblkcnt_t f_blocks, f_bfree, f_bavail; 14 fsfilcnt_t f_files, f_ffree, f_favail; 15 #if __BYTE_ORDER == __LITTLE_ENDIAN 16 unsigned long f_fsid; 17 unsigned :8*(2*sizeof(int)-sizeof(long)); 18 #else 19 unsigned :8*(2*sizeof(int)-sizeof(long)); 20 unsigned long f_fsid; 21 #endif 22 unsigned long f_flag, f_namemax; 23 int __reserved[6]; 24 }; 25 26 int statvfs (const char *__restrict, struct statvfs *__restrict); 27 int fstatvfs (int, struct statvfs *); 28 29 #define ST_RDONLY 1 30 #define ST_NOSUID 2 31 #define ST_NODEV 4 32 #define ST_NOEXEC 8 33 #define ST_SYNCHRONOUS 16 34 #define ST_MANDLOCK 64 35 #define ST_WRITE 128 36 #define ST_APPEND 256 37 #define ST_IMMUTABLE 512 38 #define ST_NOATIME 1024 39 #define ST_NODIRATIME 2048 40 #define ST_RELATIME 4096 41 42 #if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE) 43 #define statvfs64 statvfs 44 #define fstatvfs64 fstatvfs 45 #define fsblkcnt64_t fsblkcnt_t 46 #define fsfilcnt64_t fsfilcnt_t 47 #endif 48 49 #ifdef __cplusplus 50 } 51 #endif 52 53 #endif 54