Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)

utime(2) OSS System Calls Reference Manual
Use on Guardian Objects
The utime() function is supported for Guardian files (that is, files within /G) that are unstructured
Enscribe files. If the utime( ) function is called for a Guardian file that has a small file label, the
label is expanded to include the st_atime and st_ctime fields and to mark them for update.
The utime() function cannot be used on a file in /G that is opened for execution. A call for such
a file fails and errno is set to [ETXTBSY].
Use From the Guardian Environment
The file access time is not updated by I/O operations that are performed on a file that was opened
in the Guardian environment (that is, by the FILE_OPEN_ or OPEN Guardian procedures).
The utime() function is one of a set of functions that have the following effects when the first of
them is called from the Guardian environment:
Two Guardian file system file numbers (not necessarily the next two available) are allo-
cated for the root directory and the current working directory. These file numbers cannot
be closed by calling the Guardian FILE_CLOSE_ procedure.
The current working directory is assigned from the VOLUME attribute of the Guardian
environment =_DEFAULTS DEFINE.
The use of static memory by the process increases slightly.
These effects occur only when the first of the set of functions is called. The effects are not cumu-
lative.
NOTES
On systems running H06.24 or later H-series RVUs or J06.13 or later J-series RVUs, you can use
this function with 32-bit or 64-bit OSS applications.
RETURN VALUES
Upon successful completion, the value 0 (zero) is returned. Otherwise, the value -1 is returned,
errno is set to indicate the error, and the file times are not changed.
ERRORS
If any of the following conditions occurs, the utime( ) function sets errno to the corresponding
value:
[EACCES] One of the following conditions exists:
Search permission is denied by a component of the pathname prefix.
The times parameter is a null pointer, the effective user ID neither is the
owner of the file nor has appropriate privileges, and write access is
denied.
[EFAULT] Either the path parameter or the times parameter is an invalid address.
[EFSBAD] The fileset catalog is corrupted for the fileset involved in the requested operation.
[EINVAL] The function was called for a file in /G that is not a regular disk file.
[EIO] An input or output error occurred. The device holding the file might be in the
down state, or both processors that provide access to the device might have
failed.
912 Hewlett-Packard Company 527186-023