COHERENT manpages
This page displays the COHERENT manpage for ustat() [Get statistics on a file system].
List of available manpages
Index
ustat() -- System Call (libc) Get statistics on a file system #include <sys/types.h> #include <ustat.h> int ustat (device, buffer) dev_t device; struct ustat *buffer; The COHERENT system call ustat() returns information about a mounted file system. device names the device upon which the file system is mounted. buffer points to a structure of type ustat, which contains the following fields: daddr_t f_tfree; /* number of free blocks */ ino_t f_tinode; /* number of free i-nodes */ char f_fname[6]; /* name of the file system */ char f_fpack[6]; /* pack name of the file system */ Useful information may not be available for fields f_fname and f_fpack; in that case, they are initialized to nuls. ustat() returns zero if all goes well; otherwise, it returns -1 and sets errno to an appropriate value. ustat() can fail for any of the following reasons: -> device does not contain a mounted file system. -> buffer points to an illegal address. -> The kernel caught a signal while it was executing the call. See Also libc, mkfs, statfs() Note ustat() is largely superceded by statfs().