write data character-by-character
void prefixwrite (dev_t dev);
entry point initiates and supervises
a data transfer from the user data area to a device
for raw or character I/O operations.
Drivers for low-speed character devices
typically use the clist data structure
and the TTY subsystem to perform buffering.
Drivers for high-speed character devices
such as network interface boards
generally set up their own buffering schemes.
Raw I/O for block devices
Block drivers usually include a
routine to support raw I/O to the device.
The logic is:
Extract the minor device number for use by
when performing physical I/O.
Check the minor device number against
the information in the
If it is improper, use the
function to issue an error message,
u.u_error to ENODEV, and return.
For disk devices,
get the size of the device from a local driver array of disk sizes.
to ensure that the I/O is correct for the device size.
This routine calls xxbreakup which then calls
routine to perform the raw I/O.
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, 2mp, 3, 3mp, 4, 4mp, 5, 5mp, 6, 6mp
SVR5 DDI compatibility
DDI versions prior to version 7
provide similar functionality through the
entry point routine.
DDI 8 drivers use the
entry point instead.
Drivers that contain a
routine must have a w in the second column of the
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 5 HDK - June 2005