Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ustat(S) — OpenDesktop Software Development System 3.0.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

fs(F)

stat(S)

statfs(S)


 ustat(S)                       6 January 1993                       ustat(S)


 Name

    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 follow-
    ing 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, ffname and ffpack may not have significant infor-
    mation 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.

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


 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

    fs(F), stat(S), statfs(S)

 Standards conformance

    ustat is conformant with:
    AT&T SVID Issue 2; however, this routine has been withdrawn from XPG3.


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