C (22/301)

From:Jack York
Date:11 Aug 99 at 19:10:00
Subject:Accessing Broken SCSI

From: Jack York <jyork@voyager.net>

Hello,

I am trying to recover some data from a scsi drive on which the RDB
is lost. I have never tried doing anything with the SCSI device
so I may be way off here, but my thought was to take the sample
code below (from the RKM Scsi_direct example) and change it to a
a SCSIF_READ command. Then search through the read data for what I am
looking for. But I don't see how to set the starting cylinder, length,
and data buffer. Is this possible or is there a better (easier) way?
The filesystem is PFS2 BTW, if it matters.

SCSIReq.io_Length = sizeof(struct SCSICmd);
SCSIReq.io_Data = (APTR)&Cmd;
SCSIReq.io_Command = HD_SCSICMD;

Cmd.scsi_Data = (UWORD *)buffer; *
Cmd.scsi_Length = 254;
Cmd.scsi_CmdLength = 6;
Cmd.scsi_Flags = SCSIF_AUTOSENSE|SCSIF_READ;

Cmd.scsi_SenseData =(UBYTE *)Sense; *
Cmd.scsi_SenseLength = 18;
Cmd.scsi_SenseActual = 0;

DoIO( &SCSIReq );

Jack