fstatvfs(), fstatvfs64(), statvfs(), statvfs64()

get information about file system 

Function


SYNOPSIS

#include <sys/statvfs.h>

int fstatvfs(int fildes, struct statvfs *buf);

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

int fstatvfs64(int fildes, struct statvfs64 *buf);

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


DESCRIPTION

The fstatvfs() function obtains information about the file system containing the file referenced by the specified file descriptor. The statvfs() function obtains information about the file system containing the file referred to by the specified path name. Both functions take a pointer to a structure of type struct statvfs that is to be filled. Read, write, or execute permission of the named file is not required, but all directories listed in the path leading to the file must be searchable.

The fstatvfs64() and statvfs64() functions are identical to the fstatvfs() and statvfs() functions except that they take a pointer to struct statvfs64, which is capable of reporting information on larger file systems. The fstatvfs64() and statvfs64() functions are a part of the large file extensions.


PARAMETERS

fildes 

Is the file descriptor for an open file on the file system to be queried.

path 

Specifies the path name of a file within the file system.

buf 

Is a result parameter that is filled in with the information of the file system.


RETURN VALUES

If successful, fstatvfs(), fstatvfs(), statfvs(), and statvfs() return zero. On failure, they return -1 and set errno to one of the following values:

EACCES 

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

EBADF 

fildes is not a valid open file descriptor.

EFAULT 

buf or path is an invalid pointer.

EINVAL 

fildes or path refer to a file that does not reside on a physical file system.

ENAMETOOLONG 

The length of the path exceeds PATH_MAX.

ENODEV 

path refers to a drive letter that is not mounted.

ENOENT 

The named file does not exist.

ENOTDIR 

A component of the path prefix is not a directory.

EOVERFLOW 

One of the values to be returned cannot be represented correctly in the structure pointed to by buf.


CONFORMANCE

UNIX 98, with exceptions.

fstatvfs64(), statvfs64(): Large File Specification, revision 1.5.


MULTITHREAD SAFETY LEVEL

MT-Safe.


PORTING ISSUES

None.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
fstat(), fstatfs(), stat(), statfs()

Miscellaneous:
lf64, struct statvfs


PTC MKS Toolkit 10.3 Documentation Build 39.