fstatfs

Name

fstatfs -- (deprecated)

Synopsis

#include <sys/statfs.h>

int fstatfs(int fd, struct statfs * buf);

Description

The fstatfs() function returns information about a mounted file system. The file system is identified by fd, a file descriptor of an open file within the mounted filesystem. The results are placed in the structure pointed to by buf.

Fields that are undefined for a particular file system shall be set to 0.

Note: Application developers should use the fstatvfs() function to obtain general file system information. Applications should only use the fstatfs() function if they must determine the file system type, which need not be provided by fstatvfs().

Return Value

On success, the fstatfs() function shall return 0 and set the fields of the structure idenfitied by buf accordingly. On error, the fstatfs() function shall return -1 and set errno accordingly.

Errors

EBADF 

fd is not a valid open file descriptor.

EFAULT 

buf points to an invalid address.

EIO 

An I/O error occurred while reading from or writing to the file system.

ENOSYS 

The filesystem fd is open on does not support statfs().