statvfs.h
001:
002:
003:
004:
005:
006:
007:
008:
009:
010:
011:
012:
013:
014:
015:
016:
017:
018:
019: #ifndef _SYS_STATVFS_H
020: # error "Never include <bits/statvfs.h> directly; use <sys/statvfs.h> instead."
021: #endif
022:
023: #include <bits/types.h>
024:
025: #if __WORDSIZE == 32
026: #define _STATVFSBUF_F_UNUSED
027: #endif
028:
029: struct statvfs
030: {
031: unsigned long int f_bsize;
032: unsigned long int f_frsize;
033: #ifndef __USE_FILE_OFFSET64
034: __fsblkcnt_t f_blocks;
035: __fsblkcnt_t f_bfree;
036: __fsblkcnt_t f_bavail;
037: __fsfilcnt_t f_files;
038: __fsfilcnt_t f_ffree;
039: __fsfilcnt_t f_favail;
040: #else
041: __fsblkcnt64_t f_blocks;
042: __fsblkcnt64_t f_bfree;
043: __fsblkcnt64_t f_bavail;
044: __fsfilcnt64_t f_files;
045: __fsfilcnt64_t f_ffree;
046: __fsfilcnt64_t f_favail;
047: #endif
048: unsigned long int f_fsid;
049: #ifdef _STATVFSBUF_F_UNUSED
050: int __f_unused;
051: #endif
052: unsigned long int f_flag;
053: unsigned long int f_namemax;
054: int __f_spare[6];
055: };
056:
057: #ifdef __USE_LARGEFILE64
058: struct statvfs64
059: {
060: unsigned long int f_bsize;
061: unsigned long int f_frsize;
062: __fsblkcnt64_t f_blocks;
063: __fsblkcnt64_t f_bfree;
064: __fsblkcnt64_t f_bavail;
065: __fsfilcnt64_t f_files;
066: __fsfilcnt64_t f_ffree;
067: __fsfilcnt64_t f_favail;
068: unsigned long int f_fsid;
069: #ifdef _STATVFSBUF_F_UNUSED
070: int __f_unused;
071: #endif
072: unsigned long int f_flag;
073: unsigned long int f_namemax;
074: int __f_spare[6];
075: };
076: #endif
077:
078:
079:
080: enum
081: {
082: ST_RDONLY = 1,
083: #define ST_RDONLY ST_RDONLY
084: ST_NOSUID = 2
085: #define ST_NOSUID ST_NOSUID
086: #ifdef __USE_GNU
087: ,
088: ST_NODEV = 4,
089: # define ST_NODEV ST_NODEV
090: ST_NOEXEC = 8,
091: # define ST_NOEXEC ST_NOEXEC
092: ST_SYNCHRONOUS = 16,
093: # define ST_SYNCHRONOUS ST_SYNCHRONOUS
094: ST_MANDLOCK = 64,
095: # define ST_MANDLOCK ST_MANDLOCK
096: ST_WRITE = 128,
097: # define ST_WRITE ST_WRITE
098: ST_APPEND = 256,
099: # define ST_APPEND ST_APPEND
100: ST_IMMUTABLE = 512,
101: # define ST_IMMUTABLE ST_IMMUTABLE
102: ST_NOATIME = 1024,
103: # define ST_NOATIME ST_NOATIME
104: ST_NODIRATIME = 2048,
105: # define ST_NODIRATIME ST_NODIRATIME
106: ST_RELATIME = 4096
107: # define ST_RELATIME ST_RELATIME
108: #endif
109: };
110:
© Andrew Scott 2006 -
2025,
All Rights Reserved