Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ustat(2) — NEWS-os 5.0.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

stat(2)

statvfs(2)

mkdev(3C)

fs(4)



ustat(2)                  SYSTEM CALLS                   ustat(2)



NAME
     ustat - get file system statistics

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

     int ustat(devt 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 mkdev(3C)].  buf is a pointer  to  a  ustat
     structure that includes the following elements:

          daddrt   ftfree;       /* Total free blocks */
          inot     ftinode;      /* Number of free inodes */
          char      ffname[6];    /* Filsys name */
          char      ffpack[6];    /* Filsys pack name */

     ustat fails if one or more of the following are 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), statvfs(2), mkdev(3C), fs(4).

NOTES
     ustat will be phased out in favor of the statvfs function.

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.








                                                                1



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