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

open(2) OSS System Calls Reference Manual
RETURN VALUES
Upon successful completion, the function returns the le descriptor, a nonnegative integer. Oth-
erwise, 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 type of access specied by the oag parameter is denied for the
named le.
The le does not exist, and write permission is denied for the parent
directory.
The O_TRUNC ag is specied, and write permission is denied.
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.
[EEXIST] The O_CREAT and O_EXCL ags are set, and the named le exists.
[EFAULT] The path parameter is an invalid address.
[EFILEBAD] One of these conditions exists:
The function call attempted to open a Guardian EDIT le, but the struc-
ture of the le is bad.
The function call attempted to open a Guardian EDIT le, but the cor-
rupted 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 call 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.
[EINTR] A signal was caught during the open operation. This value is returned only for
character special les (terminal devices) and for FIFO special les.
[EINVAL] One of these conditions exists:
The call attempted to create a directory named lost+found in the root
directory of an OSS leset, or it attempted to create a directory named
/dev, /dev/tty,or/dev/null in the root directory of the OSS le system.
The function call specied the O_CREAT ag but did not specify the
mode parameter.
510 Hewlett-Packard Company 527186-003