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

creat(2) OSS System Calls Reference Manual
Use From the Guardian Environment
A call to the creat() function in the Guardian environment requires an OSS pathname and
returns an OSS le-system le descriptor, regardless of the le system containing the le.
The creat() function belongs to a set of functions that have these effects when the rst of them is
called from the Guardian environment:
Two Guardian le-system le numbers (not necessarily the next two available) are allo-
cated for the root directory and the current working directory. These le 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 rst of the set of functions is called. The effects are not cumu-
lative.
RETURN VALUES
Upon successful completion, the creat() function returns the le descriptor, a nonnegative
integer. Otherwise, the value -1 is returned, and errno is set to indicate the error.
ERRORS
If any of these conditions occurs, the function sets errno to the corresponding value:
[EACCES] One of these conditions exists:
Search permission is denied on a component of the pathname prex.
The le does not exist, and write permission is denied for the parent
directory.
The process attempted to open a Guardian subvolume with a reserved
name beginning with "ZYQ" or a le within such a subvolume.
The process attempted to open a static Telserv window that is not yet
connected.
[EFAULT] The path parameter is an invalid address.
[EFILEBAD] One of these conditions exists:
The function attempted to open a Guardian EDIT le, but the structure
of the le is bad.
The function attempted to open a Guardian EDIT le, but the corrupted
ag is set in the le label.
[EFSBAD] The leset catalog for one of the lesets involved in the operation is corrupt.
[EGUARDIANOPEN]
The function attempted to open a Guardian EDIT le for write access or for
Guardian shared or exclusive exclusion access, but the le has already been
opened with a Guardian procedure call.
134 Hewlett-Packard Company 527186-003