ustat(S)
ustat --
get file system statistics
Syntax
cc . . . -lc
#include <sys/types.h>
#include <ustat.h>
int ustat (dev, buf)
dev_t dev;
struct ustat *buf;
Description
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[6]; /* Filsys name */
char f_fpack[6]; /* Filsys pack name */
The last two fields, f_fname
and 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:
[ECOMM]-
dev is on a remote machine and the link
to that machine is no longer active.
[EFAULT]-
buf
points outside the process's allocated address space.
[EINTR]-
A signal was caught during a ustat system call.
[EINVAL]-
dev
is not the device number of a device containing a mounted file system.
Notes
The ``f_tfree'' field of the ustat structure
returns 512-byte blocks in UNIX binaries and
1024-byte blocks in XENIX binaries.
Diagnostics
Upon successful completion, a value of 0 is returned.
Otherwise, a value of -1 is returned and errno
is set to indicate the error.
See also
filesystem(FP),
stat(S),
statfs(S)
Standards conformance
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