read and write
These routines initiate raw I/O to or from a device.
Syntax:
#include "sys/scsi.h"
int
xxread(dev)
dev_t dev;
int
xxwrite(dev)
dev_t dev;
These routines contain these logic steps:
-
Extract the minor device number for use by
physio(D3oddi)
when performing physical I/O.
-
Check the minor device number against
the information in the
scsi_dev_cfg(D4osdi)
configuration table.
If it is improper, use the
cmn_err(D3oddi)
function to issue an error message,
set
u.u_error
to ENODEV, and return.
-
For disk devices,
get the size of the device from a local driver array of disk sizes.
-
Call
physck(D3oddi)
to ensure that the I/O is correct for the device size.
-
Call
physio(D3oddi).
This routine calls
breakup( ),
which then calls
strategy( )
to perform the raw I/O.
© 2005 The SCO Group, Inc. All rights reserved.