From owner-freebsd-current Wed Mar 15 10:53:20 1995 Return-Path: current-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id KAA07269 for current-outgoing; Wed, 15 Mar 1995 10:53:20 -0800 Received: from hda.com (hda.com [199.232.40.182]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id KAA07260 for ; Wed, 15 Mar 1995 10:53:18 -0800 Received: (dufault@localhost) by hda.com (8.6.9/8.3) id NAA00853; Wed, 15 Mar 1995 13:50:06 -0500 From: Peter Dufault Message-Id: <199503151850.NAA00853@hda.com> Subject: Re: scsi_sense To: rgrimes@gndrsh.aac.dev.com (Rodney W. Grimes) Date: Wed, 15 Mar 1995 13:50:05 -0500 (EST) Cc: charnier@lirmm.fr, current@FreeBSD.org In-Reply-To: <199503151831.KAA13156@gndrsh.aac.dev.com> from "Rodney W. Grimes" at Mar 15, 95 10:31:13 am X-Mailer: ELM [version 2.4 PL24] Content-Type: text Content-Length: 1034 Sender: current-owner@FreeBSD.org Precedence: bulk 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