dgfstat(2) DG/UX 4.30 dgfstat(2)
NAME
dg_fstat - Get extended file status information.
SYNOPSIS
#include <sys/types.h>
#include <sys/dg_stat.h>
int dg_fstat (fildes, buffer_ptr, version)
int fildes;
struct dg_stat * buffer_ptr;
unsigned short version;
PARAMETERS
fildes A valid, active file descriptor.
buffer_ptr Address of a dg_stat buffer to fill.
version Version of the struct dg_stat packet that
<buffer_ptr> refers to; should be set to
DG_STAT_VERSION_NUMBER.
DESCRIPTION
Dg_fstat() returns the current extended attributes of the
file referenced by <fildes> into the dg_stat buffer at the
location specified by <buffer_ptr>. If dg_fstat() fails,
the contents of the buffer are undefined.
The size and composition of the structure referred to by
<buffer_ptr> is determined by the <version> parameter. All
calls to this function should use DG_STAT_VERSION_NUMBER for
this parameter. <Version> allows for future revisions of
struct dg_stat to be handled in a compatible way.
The interpretation of the file's attributes depends on the
file's type (see dg_stat(5) and stat(5)).
ACCESS CONTROL
Read, write, or execute permission of the open file is not
required. However, for <fildes> to be active, the file must
be open for reading or writing.
RETURN VALUE
0 The dg_fstat operation was successful.
-1 An error occurred. Errno is set to indicate
the error.
EXCEPTIONS
Errno may be set to one of the following error codes:
Licensed material--property of copyright holder(s) Page 1
dgfstat(2) DG/UX 4.30 dgfstat(2)
EINVAL <version> is not a supported version of
struct dg_stat.
EFAULT <buffer_ptr> points to an invalid address.
EBADF <Fildes> is not a valid, active file
descriptor.
SEE ALSO
The related manual sections: chmod(2), chown(2), creat(2),
dg_mstat(2), dg_stat(2), fchmod(2), fchown(2), fstat(2),
link(2), lstat(2), mknod(2), pipe(2), read(2), stat(2),
time(2), unlink(2), utime(2), utimes(2), write(2),
dg_stat(5), stat(5).
Licensed material--property of copyright holder(s) Page 2