a1200   NEWS   APPS   DOCS   ABOUT
a1200
----
a1200
----
Autodocs
 Libraries:
 hdwrench.library
  FindControllerID
  FindDefaults
  FindDiskName
  FindLastSector
  HDWCloseDevice
  HDWOpenDevice
  InMemMountfile
  InMemRDBStructs
  LowlevelFormat
  OutMemMountfile
  OutMemRDBStructs
  QueryCapacity
  QueryFindValid
  QueryInquiry
  QueryModeSense
  QueryReady
  RawRead
  RawWrite
  ReadMountfile
  ReadRDBStructs
  ReadRDBs
  VerifyDrive
  WriteBlock
  WriteMountfile
  WriteRDBStructs
  WriteRDBs
  ZZexample
  description
Include
GuruMeditation
Docs » Autodocs » hdwrench.library » RawRead

NAME

    RawRead

SYNOPSIS

     error = RawRead ( bbk, size )
D0 A0 D0
USHORT RawRead ( BootBlock *bbk, USHORT size );

FUNCTION

    Perform a "Raw" unprocessed read on the opened device and return the
value read within the data portion of the BootBlock passed in. The
block number to read is passed into the function through the BootBlock's
bb_BlockNum value.

INPUTS

    bbk     A pointer to a BootBlock structure large enough to contain one
block of data from the device.
size USHORT containing the blocksize of the device (from QueryCapacity)
or 0 to use current internal default block size.

RESULT

    error   USHORT containing the "success" field of an RWError structure.
bbk Filled with data if successful or even partially successful
command completion is indicated.

NOTES

    This command is best used with a default blocksize assumption of 16384
for its first use. Subsequently one can use smaller blocks if one is
clever in using the fill data within the bbk structure for diagnosing
actual block size. This is a recommended technique as I have discovered
drives, chiefly when formatted for old UniSys machines, that report
incorrect block size data. (The most egregious example was a drive that
reported 2048k blocks and returned 180 bytes, the UniSys format. At least
one "unnamed" drive has returned more data than a "ReadCapacity" command
had indicated was the appropriate blocksize.)
Hdwrench.library defaults to using the above technique for diagnosing
actual block sizes under default conditions. If one has a "csascsi.device"
to contend with the best technique is to open the device within the
hdwrench.library aegis, perform a QueryCapacity, and then a RawRead on
any block on the disk. The library sets the default assumed blocksize to
the actual read block size on the first read command issued.

BUGS

    This function will get very unhappy with blocksizes over 16384. This
library buffers all reads and writes through a 16384 BYTE chip ram buffer.

SEE ALSO

hdwrench.library/RawWrite(), hdwrench.library/WriteBlock()

Comments

Name:
E-mail: Use this if you want a message if you get a response, will not be shown.
Comment:
Select correct short for:

Tristar & Red Sector Inc.

SCX
TBL
TRSI
PDX

Comments:

$VER: d0.se 1.14 Copyright © 2011-2024 Tobias Geijersson support at d0 dot se