write data to a character device
Synopsis (Not in current DDI version)
int prefixwrite(dev_t dev, uio_t *uiop,
Pointer to the
structure that describes where the data
is to be fetched from user space.
Pointer to the user credential structure for the I/O
entry point routine is called
routine is responsible for transferring data from
the user data area to the device.
routine should return 0 for success,
or the appropriate error number from those listed on the
This entry point is optional,
and is valid only for non-STREAMS character device drivers.
If this entry point is not provided,
all write I/O requests fail
with the ENODEV error number.
This entry point is called
only when the device is open.
routine is a named entry point
and must be defined as a global symbol.
The pointer to the user credentials, crp, is available
so the driver can check for required privileges, if any, using the
structure provides the information necessary to determine
how much data should be transferred.
a convenient way to copy data using the uio structure.
Block drivers that provide a character interface can use
perform the data transfer with the driver's
Context and synchronization
The driver can block and can do operations such as
that require access to
the requesting process's user-level address space.
operation is intended to be synchronous
from the caller's perspective.
Minimally, the driver's
routine should not return
until the caller's buffer is no longer needed.
For drivers that care about returning errors,
the data should be committed to the device.
For others, the data might only be copied to local staging buffers.
Then the data will be committed to the device
asynchronously to the user's request,
losing the ability to return an error with the associated request.
1, 2, 3, 4, 5, 5mp, 6, 6mp, 7, 7mp, 7.1, 7.1mp
Named entry point routines must be declared
in the driver's
The declaration for this entry point is
Differences between versions
Starting with DDI version 8, the
entry point routine is replaced by the
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005