statfs(2) DG/UX 5.4R3.00 statfs(2)
NAME
statfs - get information about a mounted file system
SYNOPSIS
#include <sys/types.h>
#include <sys/statfs.h>
int statfs (pathname, statfsbuffer, len, fstype)
char * pathname;
struct statfs * statfsbuffer;
int len;
int fstype;
where:
pathname Address of a pathname
statfsbuffer Where information about the file system is returned
len Length of the statfs structure
fstype 0 (to return the file system statistics for the file
system containing the file named by pathname) or
nonzero (to return the file system statistics for the
file system that resides on the file system device
named by pathname)
DESCRIPTION
If fstype is 0, statfs returns information about the mounted file
system that contains the file named by pathname. Otherwise, statfs
returns information about the file system residing on the device
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.
Fields that are undefined for a particular file system are set to -1.
ACCESS CONTROL
None.
Licensed material--property of copyright holder(s) 1
statfs(2) DG/UX 5.4R3.00 statfs(2)
RETURN VALUE
0 The file system information was successfully returned.
-1 An error occurred. errno is set to indicate the error.
DIAGNOSTICS
Errno may be set to one of the following error codes:
EFAULT Some part of the statfs structure pointed to by
statfsbuffer 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.
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.
EINVAL Fstype was nonzero and pathname did not name a block
special device.
SEE ALSO
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) 2