Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

stat(2)

fs(0)



  ustat(2)                            CLIX                            ustat(2)



  NAME

    ustat - Gets file system statistics

  LIBRARY

    Standard C Library (libc.a)

  SYNOPSIS

    #include <sys/types.h>

    #include <ustat.h>

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

  PARAMETERS

    dev   Identifies the device containing a mounted file system.

    buf   Points to a ustat structure where the requested information is
          stored.

  DESCRIPTION

    The ustat() function returns information about a mounted file system.  The
    value of dev is a device number identifying a device that contains a
    mounted file system.  The value of 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 */


  EXAMPLES

    To get file system statistics for a file system:

    if (ustat(fs_dev, &ustat_buf) != 0)
         perror("ustat failed");


  RETURN VALUES

    Upon successful completion, a value of 0 is returned.  Otherwise, a value
    of -1 is returned and errno is set to indicate the error.




  2/94 - Intergraph Corporation                                              1






  ustat(2)                            CLIX                            ustat(2)



  ERRORS

    The ustat() function fails if one or more of the following are true:

    [EINVAL]    The value of dev is not the device number of a device
                containing a mounted file system.

    [EFAULT]    The value of buf points outside the process's allocated
                address space.

    [EINTR]     A signal was caught during a ustat() function.

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

    [ECOMM]     The device specified by dev is on a remote machine and the
                link to that machine is no longer active.

  RELATED INFORMATION

    Functions:  stat(2)

    Files:  fs(0)































  2                                              Intergraph Corporation - 2/94




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