Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

stat(2)

fs(4)



          USTAT(2)             INTERACTIVE UNIX System             USTAT(2)



          NAME
               ustat - get file system statistics

          SYNOPSIS
               #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_name and f_fpack may not have signi-
               ficant information on all systems, and, in that case, will
               contain the null character.

               The ustat system call will fail if one or more of the fol-
               lowing is true:

               [EINVAL]       Dev is not the device number of a device con-
                              taining 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.

          SEE ALSO
               stat(2), fs(4).

          DIAGNOSTICS
               Upon successful completion, a value of 0 is returned.  Oth-
               erwise, a value of -1 is returned and errno is set to indi-
               cate the error.




          Rev. C Software Development Set                            Page 1



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026