V4/usr/man/man2/fstat.2

Find at most related files.
including files from this version of Unix.

.th FSTAT II 8/5/73
.sh NAME
fstat  \*-  get status of open file
.s3
.sh SYNOPSIS
(fstat = 28.)
.br
(file descriptor in r0)
.ft B
.br
sys fstat; buf
.s3
fstat(fildes, buf)
.br
struct inode buf;
.ft R
.sh DESCRIPTION
This
call is identical to
.it stat,
except that it operates
on open files instead of files given by name.
It is most often used to get the status
of the standard input and output files, whose names
are unknown.
.sh "SEE ALSO"
stat(II)
.sh DIAGNOSTICS
The error bit
(c-bit) is set if the file descriptor is unknown;
from C, a \*-1 return indicates an error, 0 indicates success.