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
SYSTEM V
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 fails if any of the following is 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 that is dependent on the communications protocol.