DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

ustat(2)


ustat -- get file system statistics

Synopsis

   #include <sys/types.h>
   #include <ustat.h>
   

int ustat(dev_t dev, struct ustat *buf);

Description

ustat returns information about a mounted file system. dev is a device number identifying a device containing a mounted file system [see makedev(3C)]. 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 */

Return values

On success, ustat returns 0. On failure, ustat returns -1 and sets errno to identify the error.

In the following conditions, ustat fails and sets errno to:


EINVAL
dev is not the device number of a device containing a mounted file system.

EFAULT
buf points outside the process's allocated address space.

EINTR
A signal was caught during a ustat system call.

ENOLINK
dev is on a remote machine and the link to that machine is no longer active.

ECOMM
dev is on a remote machine and the link to that machine is no longer active.

References

makedev(3C), stat(2), statvfs(2)

Notices

Although support for ustat is maintained in UnixWare 7, no guarantees are made for its behavior or continued availability. Programmers are strongly encouraged to use the replacement interface statvfs(2) instead.
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004