statfs

Name

statfs -- (deprecated)

Synopsis

#include <sys/statfs.h>

int statfs(const char *path, (struct statfs * buf));

Description

The statfs() function returns information about a mounted file system. The file system is identified by path, a path name of a file within the mounted filesystem. The results are placed in the structure pointed to by

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

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

Return Value

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

Errors

ENOTDIR 

A component of the path prefix of path is not a directory.

ENAMETOOLONG 

path is too long.

ENOENT 

The file referred to by path does not exist.

EACCES 

Search permission is denied for a component of the path prefix of path.

ELOOP 

Too many symbolic links were encountered in translating path.

EFAULT 

buf or path points to an invalid address.

EIO 

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

ENOMEM 

Insufficient kernel memory was available.

ENOSYS 

The filesystem path is on does not support statfs().