.th fstat IV 4/21/86
.sh NAME
fstat1, fstat2  -  get status of open file
.sh SYNOPSIS
fstat1(fildes, buf)
.br
struct statbuf *buf;
int fildes;
.ft R
.s3
fstat2(fildes,buf)
.br
struct statbuf *buf;
int fildes;
.ft R
.sh DESCRIPTION
These calls are identical to stat, except that they operate on open files
instead of files given by name.  They are most often used to get the
status of the standard input and output files, whose names are unknown.
.sh "SEE ALSO"
stat (IV)
.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.
.sh KSOS
Not all fields of the status structure are meaningful in KSOS.  The
fstat1 call supplies zeroes in the following fields:
.nf

        s_uid
        s_gid
        s_minor
        s_major
        s_nlinks
        s_addr
        s_actime
.fi
.s3
The fstat2 calls supplies zeroes in the following fields:
.nf

        s_size0
        s_size1
        s_modtime
        s_minor
        s_major
        s_nlinks
.fi
