statfs(2)
_________________________________________________________________
statfs System Call
Get information about a mounted file system.
_________________________________________________________________
SYNTAX
#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 attributes for the
file system represented by the 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
DG/UX 4.00 Page 1
Licensed material--property of copyright holder(s)
statfs(2)
* The number of files that the file system is capable of
holding
* The number of free file slots in the file system
* A file system identifier
See stat(5) for details.
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.
DG/UX 4.00 Page 2
Licensed material--property of copyright holder(s)
statfs(2)
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.
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).
DG/UX 4.00 Page 3
Licensed material--property of copyright holder(s)