get file system statistics
cc . . . -lc
int ustat (dev, buf)
struct ustat *buf;
The ustat system call returns information about a
mounted file system. dev is a device number
identifying a device containing a mounted file system.
buf is a pointer to a ustat structure that
includes the following elements:
daddr_t f_tfree; /* Total free blocks */
ino_t f_tinode; /* Number of free inodes */
char f_fname; /* Filsys name */
char f_fpack; /* Filsys pack name */
The last two fields,
f_fpack may not
have significant information on all systems, and, in that case,
contain the null character.
The ustat system call
fails if one or more of the following is true:
dev is on a remote machine and the link
to that machine is no longer active.
points outside the process's allocated address space.
A signal was caught during a ustat system call.
is not the device number of a device containing a mounted file system.
The ``f_tfree'' field of the ustat structure
returns 512-byte blocks in UNIX binaries and
1024-byte blocks in XENIX binaries.
Upon successful completion, a value of 0 is returned.
Otherwise, a value of -1 is returned and errno
is set to indicate the error.
ustat is not part of any
currently supported standard;
it was developed by UNIX System Laboratories, Inc. and
is maintained by The SCO Group.
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003