ioPosOffset
The Device Manager chapter of Inside Macintosh: Devices (and, for that matter,
Inside Macintosh Volume II page 185) says that ioPosOffset is passed to and returned by _Read
and _Write calls for devices. It also says that "After the transfer is completed, the ioPosOffset field indicates the current
position of the block device." Actually, ioPosOffset is not changed by _Read and _Write calls to device drivers.
On the other hand, if the _Read or _Write call is made to a file (ioRefNum is a file reference number),
ioPosOffset is updated to the reflect the mark for that file reference number after the call. This is correctly documented in
Inside Macintosh: Files (and Inside Macintosh Volume II
page 110, and Inside Macintosh Volume IV page 140).
Note also that device drivers should only look at the dCtlPosition field of the DCE,
and should not look directly at the ioPosOffset field of the parameter block. The Device Manager
sets up dCtlPosition for the driver, taking into account both the ioPosMode and
the ioPosOffset .
Back to top
Downloadables
|
Acrobat version of this Note (48K)
|
Download
|
Back to top
|