#include <sys/types.h> #include <ustat.h>
int ustat(dev, buf) dev_t dev; struct ustat *buf;
ustat() returns information about a mounted file system. dev is a device number identifying a device containing a mounted file system. This is normally the value returned in the st_dev field of a stat structure when a stat(), fstat(), or lstat() call is made on a file on that file system. buf is a pointer to a ustat structure that includes the following elements:
daddr_t f_tfree; /* Total blocks available to non-super-user */ ino_t f_tinode; /* Number of free files */ char f_fname[6]; /* Filsys name */ char f_fpack[6]; /* Filsys pack name */
The f_fname and f_fpack fields are always set to a null string. Other fields that are undefined for a particular file system are set to -1.
ustat() returns:
The NFS revision 2 protocol does not permit the number of free files to be provided to the client; thus, when ustat() is done on an NFS file system, f_tinode is always -1.
Created by unroff & hp-tools. © somebody (See intro for details). All Rights Reserved. Last modified 11/5/97