ustat(2)
NAME
ustat − get file system statistics
SYNTAX
#include <sys/types.h>
#include <ustat.h>
int ustat (dev, buf)
dev_t dev;
struct ustat ∗buf;
DESCRIPTION
The ustat call returns information about a mounted file system. The dev argument is a device number identifying a device containing a mounted file system. The buf argument is a pointer to a ustat structure that includes the following elements:
daddr_t f_tfree; /∗ Total free blocks (Kbytes) ∗/
ino_t f_tinode; /∗ Number of free inodes ∗/
char f_fname[512]; /∗ Filsys name ∗/
char f_fpack[6]; /∗ Filsys pack name ∗/
The f_fpack always returns a null string.
ENVIRONMENT
Differs from System V definition in that the size of the f_fname structure element is 512 instead of 6 and the dev parameter is type dev_t instead of int.
DIAGNOSTICS
The ustat call will fail if one or more of the following are true:
[EINVAL] The dev argument is not the device number of a device containing a mounted file system.
[EFAULT] The buf argument points outside the process’s allocated address space.
[ETIMEDOUT] A "connect" request or remote file operation failed because the connected party did not properly respond after a period of time which is dependent on the communications protocol.
SEE ALSO
System Calls