Subject: Re: Trouble with PCI, VGA, 32Mbyte
To: John F. Woods <jfw@jfwhome.funhouse.com>
From: Peter Dufault <dufault@hda.com>
List: current-users
Date: 06/11/1995 07:52:45
> 
> Checking the CDB length doesn't really help much, since SCSI commands
> come in two different lengths, as I recall, 6 and 10 bytes.  It is only
> sheer accident that the two listed destructive commands differ in length
> (FORMAT and, what was it, MODE SELECT?).

Actually there are three.  This does provide an additional
bit of protection, though.

> I think the tool would be far more useful if it did have these well-known
> commands built in; even if it weren't for the possibility of catastrophic
> typos, I'd personally much rather type "FORMAT" than "4 0 0 0 0 0" (it's
> shorter, if nothing else).  The "sysctl" program serves both as a model
> for what could be done, as well as what a total pain in the *ss it will
> be to type in and syntax-check the most popular several dozen SCSI commands.
> (I assume that *this* is the reason "FORMAT" is still spelled "4 0 0 0 0 0";
> but someday, you really ought to eat your peas, to borrow a recent metaphor
> from comp.arch...)

I don't see much advantage in this:
> scsi -f /dev/foo "<format> 0 0 0 0 0"
(or some other syntax to add mnemonics to the CDB string without
conflicting with what it currently supports)

and this:
> format=4
> scsi -f /dev/foo "${format} 0 0 0 0 0"
in a shell script.

My discussions with Joerg Wunsch centered around adding a
"scsicap"" file that could have something like this:

> format "4 0 0 0 0 0"

so that this:

> scsi -f /dev/foo --format

would result in the format.

In this proposal, the "--" option would be the equivalent of "use
the -c option after looking for the matching command string in
scsicap".

Now that the FreeBSD feature freeze has lifted something like this
will be added eventually.  It is probably 15 minutes work.

Peter

-- 
Peter Dufault               Real Time Machine Control and Simulation
HD Associates, Inc.         Voice: 508 433 6936
dufault@hda.com             Fax:   508 433 5267