dg_unbuffered_write(2) DG/UX 5.4.2 dg_unbuffered_write(2)
NAME
dgunbufferedwrite - synchronously write data to a file without
system buffering
SYNOPSIS
int dgunbufferedwrite(fildes, buffer, startblock, numblocks)
int fildes;
char buffer[];
unsigned startblock;
unsigned numblocks;
where:
fildes An active descriptor
buffer User data buffer
startblock Starting logical block of request
numblocks Size (in blocks) of the request
DESCRIPTION
The dgunbufferedwrite system call transfers numblocks 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
startblock.
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
timelastaccessed, timelastmodified, or timelastchanged 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..numblocks
Completed successfully. The number of blocks actually written
is returned.
-1 An error occurred. errno is set to indicate the error.
DIAGNOSTICS
Errno may be set to one of the following error codes:
Licensed material--property of copyright holder(s) 1
dg_unbuffered_write(2) DG/UX 5.4.2 dg_unbuffered_write(2)
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
dgunbufferedread(2), open(2), write(2).
Licensed material--property of copyright holder(s) 2