Date: Wed, 15 Mar 1995 13:12:14 -0500 (EST) From: Peter Dufault <dufault@hda.com> To: charnier@lirmm.fr (Philippe Charnier) Cc: current@FreeBSD.org Subject: Re: scsi_sense Message-ID: <199503151812.NAA00750@hda.com> In-Reply-To: <199503151634.RAA08046@lirmm.lirmm.fr> from "Philippe Charnier" at Mar 15, 95 05:22:15 pm
next in thread | previous in thread | raw e-mail | index | archive | help
Philippe Charnier writes: > > Hello, > > > from scsi_sence.c (in src/sys/scsi) > > {0x26, 0x03, "Threshold parameters not supported" }, > {0x46, 0x00, "Unsuccessful soft reset" }, > #endif /* NO_SCSI_SENSE */ > {0xff, 0xff, 0 }, > }; > > char *scsi_sense_desc(int asc, int ascq) > { > int i; > for (i = 0; i < sizeof(tab) / sizeof(tab[0]); i++) > if (tab[i].asc == asc && tab[i].ascq == ascq) > return tab[i].desc; > > return "no available sense description"; > } > > Why this code don't use {0xff, 0xff, 0 } as a end of list? Because we know the table size. -- 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?199503151812.NAA00750>