read data from a character device
Synopsis (Not in current DDI version)
int prefixread(dev_t dev, uio_t *uiop, cred_t *crp);
entry point routine is called during the
routine is responsible for transferring data from the device
to the user data area;
it is a named entry point
and must be defined as a global symbol.
Pointer to the
structure that describes where the data
is to be stored in user space.
Pointer to the user credential structure for the I/O
routine should return 0 for success,
or the appropriate error number from those listed on the
This entry point is optional,
and is valid for non-STREAMS character device drivers only.
If this entry point routine is not provided,
all read I/O requests will fail
with the ENODEV error number.
This entry point is called only when the device is open.
The pointer to the user credentials, crp, is available
so the driver can check for required privileges.
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.
1, 2, 3, 4, 5, 5mp, 6, 6mp, 7, 7mp, 7.1, 7.1mp
Differences between versions
Starting with DDI version 8, the
entry point routine is replaced by the
entry point routine.
Named entry point routines must be declared
in the driver's
The declaration for this entry point is
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005