statvfs.h File

Purpose

Describes the structure of the statistics that are returned by the statvfs subroutines and fsatvfs subroutines.

Description

The statvfs subroutines and fsatvfs subroutines return information on a mounted filesystem in the form of statvfs. The /usr/include/sys/statvfs.h file describes the following fields in the statvfs subroutine:

Item Description
f_bsize Preferred file system block size
f_frsize Fundamental file system block size
f_block Total number of block f_frsize in the file system.
f_bfree Total number of free blocks of f_frsize in the file system.
f_bavail Total number of available blocks of f_frsize that can be used by users without root access.
f_files Total number of file nodes in the file system
f_ffree Number of free file nodes in the file system.
f_favail Number of free file nodes that can be user without root access.
f_fsid File system ID.
f_basetype File system type name
f_flag File system flags:
ST_RDONLY
File system is mounted read only
ST_NOSUID
File system does not support set used ID file modes
ST_NODEV
Device opens are not allowed through mounts.
f_namemax Maximum length of a component name for this file system
f_fstr File system specific string.

The following prototypes also appear in the /usr/include/sys/statvfs.h file:

extern int statvfs(const char *, struct statvfs *);
extern int fsatvfs(int, struct statvfs *);