Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ustat(2) — CX/UX 6.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

stat(2)

statfs(2)

fs(4)

ustat(2)  —  AT&T SYSTEM V

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

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 to following elements:

daddr_tf_tfree;  /∗ Total number of free 512-byte 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:


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

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

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.

NOTES

In the current implementation, both the file system name and the file system pack name are null strings. 

The statfs(2) system services provide more information about a file system than ustat does. 

SEE ALSO

stat(2), statfs(2), fs(4). 

CX/UX Programmer’s Reference Manual

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