NAME
statfs, fstatfs - get file system statistics

returns information about a mounted file system. is the path name of any file within the mounted filesystem. is a pointer to a structure defined as follows:
struct statfs {
   long    f_type;     /* type of filesystem (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 non-superuser */
   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_spare[6]; /* spare for later */
};
File system types:
linux/ext2_fs.h:  EXT2_OLD_SUPER_MAGIC  0xEF51
linux/ext2_fs.h:  EXT2_SUPER_MAGIC      0xEF53
linux/ext_fs.h:   EXT_SUPER_MAGIC       0x137D
linux/iso_fs.h:   ISOFS_SUPER_MAGIC     0x9660
linux/minix_fs.h: MINIX_SUPER_MAGIC     0x137F /* orig. minix */
linux/minix_fs.h: MINIX_SUPER_MAGIC2    0x138F /* 30 char minix */
linux/minix_fs.h: NEW_MINIX_SUPER_MAGIC 0x2468 /* minix V2 */
linux/msdos_fs.h: MSDOS_SUPER_MAGIC     0x4d44
linux/nfs_fs.h:   NFS_SUPER_MAGIC       0x6969
linux/proc_fs.h:  PROC_SUPER_MAGIC      0x9fa0
linux/xia_fs.h:   _XIAFS_SUPER_MAGIC    0x012FD16D
Fields that are undefined for a particular file system are set to -1. returns the same information about an open file referenced by descriptor On success, zero is returned. On error, -1 is returned, and is set appropriately. For A component of the path prefix of is not a directory. contains a character with the high-order bit set. The length of a component of exceeds 255 characters, or the length of exceeds 1023 characters. [Documenter's note: are these values correct for Linux?] The file referred to by does not exist. Search permission is denied for a component of the path prefix of Too many symbolic links were encountered in translating or points to an invalid address. An I/O error occurred while reading from or writing to the file system. For is not a valid open file descriptor. points to an invalid address. An I/O error occurred while reading from or writing to the file system.