statvfs(3) Library Functions Manual statvfs(3) statvfs, fstatvfs - (libc -lc) #include int statvfs(const char *restrict path, struct statvfs *restrict buf); int fstatvfs(int fd, struct statvfs *buf); statvfs() . path . buf statvfs : struct statvfs { unsigned long f_bsize; /* */ unsigned long f_frsize; /* */ fsblkcnt_t f_blocks; /* f_frsize */ fsblkcnt_t f_bfree; /* */ fsblkcnt_t f_bavail; /* */ fsfilcnt_t f_files; /* inode */ fsfilcnt_t f_ffree; /* inode */ fsfilcnt_t f_favail; /* inode */ unsigned long f_fsid; /* */ unsigned long f_flag; /* */ unsigned long f_namemax; /* */ }; fsblkcnt_t fsfilcnt_t . unsigned long. f_flag . : ST_MANDLOCK ( fcntl(2)). ST_NOATIME mount(2). ST_NODEV . ST_NODIRATIME mount(2). ST_NOEXEC . ST_NOSUID set-user-ID set-group-ID exec(3) ST_RDONLY . ST_RELATIME atime mtime/ctime mount(2). ST_SYNCHRONOUS ( O_SYNC open(2)). . fstatvfs() fd. . -1 errno . EACCES (statvfs()) path. ( path_resolution(7).) EBADF (fstatvfs()) fd . EFAULT Buf path . EINTR signal(7). EIO / . ELOOP (statvfs()) path. ENAMETOOLONG (statvfs()) path . ENOENT (statvfs()) path . ENOMEM . ENOSYS . ENOTDIR (statvfs()) path . EOVERFLOW (struct) . attributes(7). +------------+------------------------------------+--------------------+ || | | +------------+------------------------------------+--------------------+ |statvfs(), | | MT-Safe | |fstatvfs() | | | +------------+------------------------------------+--------------------+ ST_NOSUID ST_RDONLY f_flag POSIX.1. _GNU_SOURCE. statfs(2) fstatfs(2) . glibc pathconf(path, _PC_REC_XFER_ALIGN); pathconf(path, _PC_ALLOC_SIZE_MIN); pathconf(path, _PC_REC_MIN_XFER_SIZE); f_frsize f_frsize f_bsize statvfs() path. f_favail f_ffree . (inode). POSIX.1-2008. POSIX.1-2001. glibc 2.13 statvfs() f_flag (mount) /proc/mounts. 2.6.36 statfs(2) f_flags glibc 2.13 statvfs() /proc/mounts. statfs(2) 3 . . : . 6.18 8 2026 statvfs(3)