ustat(2)
NAME
ustat − get file system statistics
SYNTAX
#include <sys/types.h>
#include <ustat.h>
int ustat(dev, buf)
int dev;
struct ustat ∗buf;
DESCRIPTION
The ustat system call returns information about a mounted file system. The specified dev is a device number identifying a device containing a mounted file system. The specified buf is a pointer to a ustat structure that includes:
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 VALUE
If unsuccessful, returns a −1, and the global variable errno indicates the error code.
DIAGNOSTICS
The ustat call will fail if:
[EINVAL] The specified dev is not the device number of a device containing a mounted file system.
[EFAULT] The specified buf points outside the process’s allocated address space.