USTAT(2) SysV USTAT(2)
NAME
ustat - get file system statistics
SYNOPSIS
#include <sys/types.h>
#include <ustat.h>
int ustat (dev, buf)
dev_t dev;
struct ustat *buf;
DESCRIPTION
ustat returns information about a mounted file system. dev is a device
number identifying a device containing a mounted file system. buf is a
pointer to a ustat structure that includes the following elements:
daddr_t f_tfree; /* Total free blocks */
ino_t f_tinode; /* Number of free inodes */
char f_fname[6]; /* Filsys name */
char f_fpack[6]; /* Filsys pack name */
DIAGNOSTICS
A successful call returns zero. A failed call returns -1 and sets errno
as indicated below.
ERRORS
ustat will fail if one or more of the following are true:
[EINVAL] dev is not the device number of a device containing a mounted
file system.
[EFAULT] buf points outside the process' allocated address space.
[EINTR] A signal was caught during a ustat system call.
[ECOMM] dev is on a remote machine and the link to that machine is no
longer active.
NOTES
ustat provides only a subset of the information that may be obtained with
statfs(2).
SEE ALSO
stat(2), statfs(2).
NOTES
Under other implementations, ustat fails if the following is true:
[ENOLINK] dev is on a remote machine and the link to that machine is no
longer active.