dgunbufferedread(2) DG/UX 4.30 dgunbufferedread(2)
NAME
dg_unbuffered_read - Synchronously read data blocks from a
file without system buffering
SYNOPSIS
int dg_unbuffered_read (fildes, buffer, start_block, num_blocks)
int fildes;
char buffer[];
unsigned start_block;
unsigned num_blocks;
PARAMETERS
fildes
A valid descriptor.
buffer
User data buffer.
start_block
Starting logical block number.
num_blocks
Size (in blocks) of the read.
DESCRIPTION
The dgunbufferedread system call transfers num_blocks
blocks of data from the file associated with fildes into the
buffer pointed to by buffer. The starting block number of
the transfer is given by the start_block parameter.
The file position attribute of fildes is ignored by this
interface. The starting block position of the read must be
specified in the call. The file position attribute of
fildes remains unchanged by the execution of this call.
If mandatory record locking is enabled for the file, this
call will fail.
ACCESS CONTROL
The fildes must have been opened for unbuffered I/O with the
O_DG_UNBUFFERED flag, and fildes must also have been opened
for read access.
RETURN VALUE
0..num_blocks
Completed successfully. The number of blocks actually
read is returned. The value 0 indicates EOF (end-of-
file).
-1 An error occurred. Errno is set to indicate the error.
EXCEPTIONS
Licensed material--property of copyright holder(s) Page 1
dgunbufferedread(2) DG/UX 4.30 dgunbufferedread(2)
Errno may be set to one of the following error codes:
EBADF
fildes is not opened for unbuffered reading.
EFAULT
Buffer points outside the allocated address space.
EINTR
A signal was caught during the system call.
SEE ALSO
open(2), dg_unbuffered_write(2).
Licensed material--property of copyright holder(s) Page 2