Open System Services System Calls Reference Manual (G06.25+, H06.03+)

System Functions (s and S) stat(2)
Use on Guardian Objects
The st_dev and st_ino elds of the stat structure do not uniquely identify Guardian les (les in
/G).
The st_dev eld is unique for /G, for each disk volume and for each Telserv process (or other
process of subdevice type 30), because each of these is a separate leset.
The S_ISGUARDIANOBJECT macro can indicate whether an object is a Guardian object
when the st_dev eld is passed to the macro. The value of the macro is TRUE if the object is a
Guardian object and FALSE otherwise.
The st_ino eld is a nonunique encoding of the Guardian lename.
The st_rdev eld contains a unique minor device number for each ptyn entry in /G/ztnt/,
representing each Telserv process subdevice.
The st_size eld of an EDIT le (le code 101) is the actual (physical) end of le, not the number
of bytes in the le. For directories, st_size is set to 4096.
When an OSS function is called for a Guardian EDIT le, the st_mtime eld is set to the last
modication time. The st_atime eld indicates the last time the le was opened, and the
st_ctime eld is set equal to st_mtime. No other time-related elds are updated by OSS function
calls.
The st_ctime and st_atime elds for Guardian regular disk les (except for EDIT les) are
updated by OSS function calls, not by Guardian procedure calls.
The time elds for /G, /G/vol, and /G/vol/subvol always contain the current time.
When the path parameter points to the name of a Guardian process that is not a process of sub-
type 30, the stat() function call fails. The value -1 is returned, and errno is set to [ENOENT].
The stat() function always returns access modes of "d---------" when the path parameter points to
a Guardian subvolume that has a reserved name beginning with ZYQ. The other access modes
reported for les in /G vary according to the le type.
The next table shows the mapping between Guardian les and their corresponding le types
described in the st_mode eld.
Table 71. Guardian File Type Mappings
Guardian st_mode
Example in /G File Type File Type Permissions
___________________________________________________________________
N/A Directory r-xr-xr-x/G
vol Disk volume Directory rwxrwxrwx
vol/subvol Subvolume Directory rwxrwxrwx
vol/subvol/leid Disk le Regular le See following text
vol/#123 Temporary disk le Regular le See following text
ztnt Subtype 30 process Directory --x--x--x
ztnt/#pty0001 Subtype 30 process
with qualier
Character special rw-rw-rw-
vol1/zyq00001 Subvolume Directory ---------
A Guardian le classied as a directory is always owned by the super ID.
527186-003 Hewlett-Packard Company 7165