statfs(2) DG/UX 4.30 statfs(2)
NAME
statfs - Get information about a mounted file system.
SYNOPSIS
#include <sys/types.h>
#include <sys/statfs.h>
int statfs (pathname, statfs_buffer, len, fstype)
char * pathname;
struct statfs * statfs_buffer;
int len;
int fstype;
PARAMETERS
pathname Address of a pathname.
statfs_buffer Where information about the file system is
returned.
len Length of the statfs structure.
fstype If 0, then return the file system statistics
for the file system containing the file. If
not 0, then return the file system statistics
for the file system that resides on the file
system device named by file.
DESCRIPTION
Statfs returns information about the mounted file system
that contains the file named by <pathname>. Terminal
symbolic links are followed. The statistics returned are:
* The file system block size
* The total number of blocks in the file system
* The number of free blocks in the file system
* The number of free blocks that are available to a non-
superuser process
* The number of files that the file system is capable of
holding
* The number of free file slots in the file system
* A character string file system identifier
See stat(5) for details.
Licensed material--property of copyright holder(s) Page 1
statfs(2) DG/UX 4.30 statfs(2)
Fields that are undefined for a particular file system are
set to -1.
ACCESS CONTROL
None.
RETURN VALUE
0 The file system information was successfully
returned.
-1 An error occurred. Errno is set to indicate
the error.
EXCEPTIONS
Errno may be set to one of the following error codes:
EFAULT Some part of the statfs structure pointed to
by <statfs_buffer> lies outside of the
process's writable address space.
ENOENT The named file does not exist.
ENOENT A non-terminal component of the pathname does
not exist.
ENOTDIR A non-terminal component of the pathname was
not a directory or symbolic link.
ENAMETOOLONG The pathname exceeds the length limit for
pathnames.
ENAMETOOLONG A component of the pathname exceeds the
length limit for filenames.
ENOMEM There are not enough system resources to
resolve the pathname or to expand a symbolic
link.
ELOOP The number of symbolic links encountered
during pathname resolution exceeded
MAXSYMLINKS. A symbolic link cycle is
suspected.
Licensed material--property of copyright holder(s) Page 2
statfs(2) DG/UX 4.30 statfs(2)
EPERM The pathname contains a character not in the
allowed character set.
EFAULT The pathname does not completely reside in
the process's address space or the pathname
does not terminate in the process's address
space.
SEE ALSO
The related manual sections: chmod(2), chown(2), creat(2),
fchmod(2), fchown(2), fstatfs(2), link(2), mknod(2),
pipe(2), read(2), time(2), times(2), ustat(2), write(2),
fs(4),
statfs(5).
Licensed material--property of copyright holder(s) Page 3