Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ustat(2) — GL2 W3.6

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

stat(2)

fs(4)

USTAT(2)  —  Silicon Graphics

NAME

ustat − get file system statistics

SYNOPSIS

#include <sys/types.h>
#include <ustat.h> int ustat (dev, buf)
int 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.  Buf is a pointer to a ustat structure that includes the following elements:

daddr_tf_tfree;/∗ Total free blocks ∗/
ino_tf_tinode;/∗ Number of free inodes ∗/
charf_fname[6];/∗ Filsys name ∗/
charf_fpack[6];/∗ Filsys pack name ∗/

Ustat will fail if one or more of the following are true:

Dev is not the device number of a device containing a mounted file system.  ­[EINVAL]

Buf points outside the process’s allocated address space.  ­[EFAULT]

RETURN VALUE

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

stat(2), fs(4). 

ASSEMBLER

moveq#57,D0
movlbuf,A0
movldev,D1
movl#2,A1| ustat
trap#0

Carry bit set on failure and cleared on success. 

Version 3.6  —  December 20, 1987

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