Open System Services System Calls Reference Manual (G06.28+, H06.05+)

System Functions (s and S) stat64(2)
The le information is written to the area specied by the buffer parameter, which is a pointer to
a stat64 structure with this denition from the sys/stat.h header le:
struct stat {
dev_t st_dev;
ino64_t st_ino;
mode_t st_mode;
nlink_t st_nlink;
unsigned int st_acl:1; |
unsigned int __ller_1:15; |
uid_t st_uid;
gid_t st_gid;
dev_t st_rdev;
off64_t st_size;
time_t st_atime;
time_t st_mtime;
time_t st_ctime;
mode_t st_basemode; /* Permissions with original group perms */ |
int64_t reserved[3];
};
For a regular le, the stat64() function sets the st_size eld of the stat64 structure to the length
of the le and sets the st_mode eld to indicate the le type. For a symbolic link, the stat64()
function returns information about the le at the end of the link; no information about the link is
returned. (For information about the link, use the lstat64( ) function.)
The stat64() function updates any time-related elds associated with the le before writing into
the stat64 structure, unless it is a read-only leset. Time-related elds are not updated for read-
only OSS lesets.
The elds in the stat64 structure have these meanings and content:
st_dev OSS device identier for a leset.
Values for local OSS objects are listed next. Values for local
Guardian objects are described in Use on Guardian Objects,
and values for remote Guardian or OSS objects are described in
Use on Remote Objects, later in this reference page.
For Contains
Regular le ID of device containing directory entry
Directory ID of device containing directory
FIFO ID of special leset for pipes
AF_UNIX socket ID of device containing the leset in which
the socket le was created
/dev/null ID of device containing directory entry
/dev/tty ID of device containing directory entry
st_ino File serial number (inode number). The le serial number and
OSS device identier uniquely identify a regular OSS le within
an OSS leset.
Values for OSS objects are listed next. Values for Guardian
objects are described in Use on Guardian Objects, later in this
reference page.
527186-007 Hewlett-Packard Company 7393