75 lines
1.8 KiB
Plaintext
75 lines
1.8 KiB
Plaintext
'\"macro stdmacro
|
|
.if n .pH g2.ustat @(#)ustat 41.6 of 5/26/91
|
|
.\" Copyright 1991 UNIX System Laboratories, Inc.
|
|
.\" Copyright 1989, 1990 AT&T
|
|
.nr X
|
|
.if \nX=0 .ds x} ustat 2 "" "\&"
|
|
.if \nX=1 .ds x} ustat 2 ""
|
|
.if \nX=2 .ds x} ustat 2 "" "\&"
|
|
.if \nX=3 .ds x} ustat "" "" "\&"
|
|
.TH \*(x}
|
|
.SH NAME
|
|
\f4ustat\f1 \- get file system statistics
|
|
.SH SYNOPSIS
|
|
\f4#include <sys/types.h>\f1
|
|
.br
|
|
\f4#include <ustat.h>\f1
|
|
.PP
|
|
\f4int ustat(dev_t dev, struct ustat \(**buf); \f1
|
|
.SH DESCRIPTION
|
|
\f4ustat\f1
|
|
returns information about a mounted file system.
|
|
\f2dev\f1
|
|
is a device number identifying a device containing
|
|
a mounted file system [see \f4makedev\f1(3C)].
|
|
\f2buf\f1
|
|
is a pointer to a
|
|
\f4ustat\f1
|
|
structure that includes the following elements:
|
|
.PP
|
|
.RS
|
|
.ft 4
|
|
.nf
|
|
.ta 10n 25n 30n
|
|
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 \(**/
|
|
.fi
|
|
.ft 1
|
|
.RE
|
|
.P
|
|
.PP
|
|
\f4ustat\f1
|
|
fails if one or more of the following are true:
|
|
.TP 15
|
|
\f4EINVAL\f1
|
|
\f2dev\f1
|
|
is not the device number of a device containing a mounted file system.
|
|
.TP
|
|
\f4EFAULT\f1
|
|
\f2buf\f1
|
|
points outside the process's allocated address space.
|
|
.TP
|
|
\f4EINTR\f1
|
|
A signal was caught during a \f4ustat\f1 system call.
|
|
.TP
|
|
\f4ENOLINK\f1
|
|
\f2dev\f1 is on a remote machine and the link
|
|
to that machine is no longer active.
|
|
.TP
|
|
\f4ECOMM\f1
|
|
\f2dev\f1 is on a remote machine and the link
|
|
to that machine is no longer active.
|
|
.SH "SEE ALSO"
|
|
\f4stat\f1(2), \f4statvfs\f1(2), \f4makedev\f1(3C), \f4fs\f1(4).
|
|
.SH NOTES
|
|
\f4ustat\f1 will be phased out in favor of the \f4statvfs\f1 function.
|
|
.SH "DIAGNOSTICS"
|
|
Upon successful completion, a value of 0 is returned.
|
|
Otherwise, a value of \-1 is returned and
|
|
\f4errno\fP
|
|
is set to indicate the error.
|
|
.\" @(#)ustat.2 6.2 of 9/6/83
|
|
.Ee
|