dgunbufferedwrite(2) DG/UX 4.30 dgunbufferedwrite(2)
NAME
dg_unbuffered_write - Synchronously write data to a file
without system buffering
SYNOPSIS
int dg_unbuffered_write (fildes, buffer, start_block, num_blocks)
int fildes;
char buffer[];
unsigned start_block;
unsigned num_blocks;
PARAMETERS
fildes
An active descriptor.
buffer
User data buffer.
start_block
Starting logical block of request.
num_blocks
Size (in blocks) of the request.
DESCRIPTION
The dgunbufferedwrite system call transfers num_blocks
blocks of data from the buffer pointed to by buffer into the
object associated with fildes. The starting position of the
request is given by start_block.
The file position attribute of fildes is ignored by this
interface. The starting block position of the write must be
specified in the call. The file position attribute of
fildes remains unchanged by the execution of this call.
If the operation is successful, the inode is flushed out
before control is returned to the user if any attribute
other than time_last_accessed, time_last_modified, or
time_last_changed of the file has changed. Index blocks
modified by this operation are also flushed before returning
control to the user.
If mandatory record locking is enabled for the file, this
call will fail.
ACCESS CONTROL
The process must have write access to the descriptor fildes,
and it must have been opened with the O_DG_UNBUFFERED open
flag to allow for unbuffered I/O access.
RETURN VALUE
0..num_blocks
Licensed material--property of copyright holder(s) Page 1
dgunbufferedwrite(2) DG/UX 4.30 dgunbufferedwrite(2)
Completed successfully. The number of blocks actually
written is returned.
-1 An error occurred. Errno is set to indicate the error.
EXCEPTIONS
Errno may be set to one of the following error codes:
EBADF
fildes is not opened for unbuffered writing.
EFBIG
An attempt was made to write a file that exceeds the
process's file size limit or the maximum file size.
EFAULT
Buffer points outside the allocated address space.
EINTR
A signal was caught during the system call.
SEE ALSO
dg_unbuffered_read(2), open(2), write(2).
Licensed material--property of copyright holder(s) Page 2