Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Mar 1995 13:50:05 -0500 (EST)
From:      Peter Dufault <dufault@hda.com>
To:        rgrimes@gndrsh.aac.dev.com (Rodney W. Grimes)
Cc:        charnier@lirmm.fr, current@FreeBSD.org
Subject:   Re: scsi_sense
Message-ID:  <199503151850.NAA00853@hda.com>
In-Reply-To: <199503151831.KAA13156@gndrsh.aac.dev.com> from "Rodney W. Grimes" at Mar 15, 95 10:31:13 am

next in thread | previous in thread | raw e-mail | index | archive | help
Rodney W. Grimes writes:

> But I do have a concert about the 0xff, 0xff, 0 at the end of the
> table.  What happens if (and don't say no device should ever return
> this value you never know what might go wrong) a device returns
> asc=0xff, ascq=0xff.  We end up returning a null pointer, this is
> not good :-(.
> 
> How about:
> 	{0xff, 0xff, "Sense values are invalid (0xFF, 0xFF)"},

Hmmmm...
When I put the 0 there I intended that to be the end flag you could
use in alternative table searches since you would never have a NULL
pointer for a description. (I needed something there in case
"NO_SCSI_SENSE" was defined).

A fix that both leaves the "out of band" end flag for future use
and fixes the very real problem that Rod points out is:

>    for (i = 0; i < sizeof(tab) / sizeof(tab[0]) - 1; i++)

I'll commit this at the end of the day or tomorrow AM.

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199503151850.NAA00853>