Subject: Re: LC 475
To: Charles J. Williams <chas@ohm.nrl.navy.mil>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: port-mac68k
Date: 10/18/1995 08:40:24
On Wed, 18 Oct 1995 07:09:12 -0400 
 "Charles J. Williams" <chas@ohm.nrl.navy.mil> wrote:

 > However, to do a low-level format I would actually have to send some
 > low-level scsi commands and that would not be as easy as just tinkering
 > with the couple of blocks at the beginning of the disk.

Actually, it is pretty easy... :-)  Essentially, you open the device for 
writing, fill out a simple structure, and do an ioctl.

 > does anyone have a generic 'scsi driver' implementation that could be used
 > in a formatting utility?  what would one actually need to do?

In case anyone's interested, I'm working on a low-level scsi device 
manipulation tool ... just happen to need it for the Real Job, and, once 
it's done, I'll be submitting it for inclusion in NetBSD.  It's currently 
smart enough to set spindle sync params, cache policy, etc.  Basically, 
anything settable in the mode pages, and understands how to query them as 
well.  Probably in the next couple of days I'll be adding the 
`format-unit' command, but won't be able to test that bit until my box of 
disks arrives... :-/

I might even be inspired to add bad block remapping and some sort of 
media verification...

In any case, you asked if someone has one, and I guess my answer is 
"almost" :-)

--------------------------------------------------------------------------
Jason R. Thorpe                                       thorpej@nas.nasa.gov
NASA Ames Research Center                               Home: 408.866.1912
NAS: M/S 258-6                                          Work: 415.604.0935
Moffett Field, CA 94035                                Pager: 415.428.6939