statfs.2: Bring statfs struct type declarations closer to glibc reality

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2010-06-13 05:45:16 +02:00
parent 2ff07a1e5f
commit 1e7351d41f
1 changed files with 18 additions and 10 deletions

View File

@ -45,17 +45,25 @@ structure defined approximately as follows:
.in +4n
.nf
#if __WORDSIZE == 32 /* System word size */
# define __UWORD_TYPE unsigned int
#else /* __WORDSIZE == 64 */
# define __SWORD_TYPE long int
#endif
struct statfs {
long f_type; /* type of file system (see below) */
long f_bsize; /* optimal transfer block size */
long f_blocks; /* total data blocks in file system */
long f_bfree; /* free blocks in fs */
long f_bavail; /* free blocks avail to unprivileged user */
long f_files; /* total file nodes in file system */
long f_ffree; /* free file nodes in fs */
fsid_t f_fsid; /* file system id */
long f_namelen; /* maximum length of filenames */
long f_frsize; /* fragment size (supported since Linux 2.6) */
__SWORD_TYPE f_type; /* type of file system (see below) */
__SWORD_TYPE f_bsize; /* optimal transfer block size */
fsblkcnt_t f_blocks; /* total data blocks in file system */
fsblkcnt_t f_bfree; /* free blocks in fs */
fsblkcnt_t f_bavail; /* free blocks available to
unprivileged user */
fsfilcnt_t f_files; /* total file nodes in file system */
fsfilcnt_t f_ffree; /* free file nodes in fs */
fsid_t f_fsid; /* file system id */
__SWORD_TYPE f_namelen; /* maximum length of filenames */
__SWORD_TYPE f_frsize; /* fragment size (since Linux 2.6) */
__SWORD_TYPE f_spare[5];
};
File system types: