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

read64_(2) OSS System Calls Reference Manual
RETURN VALUES
Upon successful completion, the read64_() function returns the number of bytes actually read
and placed into the buffer. The function guarantees to read the number of bytes requested only if
the descriptor references a regular file that has at least that number of bytes left before EOF.
If the read otherwise fails, the value -1 is returned, errno is set to indicate the error, and the con-
tents of the buffer pointed to by the buffer parameter are indeterminate.
ERRORS
If any of these conditions occurs, the read64_() function sets errno to the corresponding value:
[EAGAIN] The O_NONBLOCK flag is set for the file descriptor, and the process would be
delayed in the read operation.
The O_NONBLOCK flag is set, and no data was available.
[EALREADY] Operation already in progress. An I/O operation started by a thread-aware func-
tion (such as spt_writez()) is in progress on a regular file and a function that is
process-blocking for regular files (such as read(), spt_read(),orspt_readx())
attempts to begin an I/O operation on the same open file.
[EBADF] The filedes parameter is not a valid file descriptor open for reading.
[ECONNRESET]
One of these conditions occurred:
The transport-provider process for this socket is no longer available.
The TCP/IP subsystem for this socket is no longer available.
The connection was forcibly closed by the peer socket.
The file descriptor specified by the filedes parameter can only be closed.
[EFAULT] The buffer parameter points to a location outside of the allocated address space
of the process.
[EFILEBAD] An attempt was made to read from a Guardian EDIT file (a file in /G with file
code 101) with a corrupted internal structure.
[EINTR] A read64_() operation was interrupted by a signal before any data arrived.
[EINVAL] The value of the nbytes parameter is greater than SSIZE_MAX.
[EIO] One of these conditions occurred:
The process is a member of a background process group attempting to
read from its controlling terminal, the process is ignoring or blocking the
SIGTTIN signal, or the process group is orphaned.
A physical I/O error occurred. Data might have been lost during a
transfer.
[EISDIR] A read64_() operation was attempted against a directory.
[EISGUARDIAN]
The value used for the filedes parameter is appropriate only in the Guardian
environment.
610 Hewlett-Packard Company 527186-023