ustat(2) ustat(2)
NAME
ustat - get file system statistics
SYNOPSIS
#include <sys/types.h>
#include <ustat.h>
int ustat(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 [see makedev(3C)]. 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 */
Return Values
On success, ustat returns 0. On failure, ustat returns -1 and
sets errno to identify the error.
Errors
In the following conditions, ustat fails and sets errno to:
EINVAL dev is not the device number of a device containing a
mounted file system.
EFAULT buf points outside the process's allocated address
space.
EINTR A signal was caught during a ustat system call.
ENOLINK
dev is on a remote machine and the link to that machine
is no longer active.
ECOMM dev is on a remote machine and the link to that machine
is no longer active.
REFERENCES
makedev(3C), stat(2), statvfs(2)
Copyright 1994 Novell, Inc. Page 1
ustat(2) ustat(2)
NOTICES
The ustat(2) interface was defined obsolete in UNIX System V
Release 4. Although support for ustat is maintained in
Release 4, support will be discontinued in the next major
release. All remaining code using this interface must be
converted to use the replacement interface statvfs(2).
Copyright 1994 Novell, Inc. Page 2