Subject: Re: Trouble with PCI, VGA, 32Mbyte
To: Charles M. Hannum <firstname.lastname@example.org>
From: John F. Woods <email@example.com>
Date: 06/11/1995 02:05:01
Boy, what a can of worms I seem to have stepped in, to mix a metaphor.
> Checking the CDB length will avoid lossage in that specific case, but
> the same caveat applies to mistyping a REQUEST SENSE command, or a
> variety of other trivial mistakes. The current interface provides no
> way for the user to have any certainty that he/she is not going to
> lose catastrophically.
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?).
> Adding mnemonic names for the well-known commands certainly isn't
> difficult, and would go pretty far toward making the interface more
> resistant to errors. I simply can't fathom why you object so strongly
> to this.
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
But eventually you're going to want to issue a command which isn't in the
table, either a moderately obscure standard one, or worse, a vendor-specific
code (quick, what mnemonic would you select for E8? *). So the raw bytes
interface is also needed. But it would be really, really nice to have an
alternative for the obvious cases.
* It's one of the commands needed to rewrite the microcode on a Maxtor
LXT-1240S drive. I forget exactly what it does, though I do remember the
magic password for the drives (and I ain't tellin' :-). (I got to write
a (re)formatter while at KSR, since we uncovered a lot of serious bugs
*after* buying a boatload of the things...)