Subject: Re: opinion sought about minor change to error reporting in scsi_base
To: Matthew Jacob <mjacob@feral.com>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: tech-kern
Date: 07/02/1998 19:35:26
On Jul 2, Matthew Jacob wrote
> Hmmm.. I'll have to think about this some.
>
> No... the code I added to st_interpret_sense only modifies
> whether st_interpret_sense will call scsi_print_sense.
> The return values from st_interpret_sense still stay the same:
> 0 for no error, -1 for 'continue processing' or errno of some kind.
>
> In scsi_interpret_sense the case statement I modified is already
> set to return zero (error = 0). I'm returning instead of doing
> a break only to avoid the call to scsi_print_sense (or the
> non-SCSIVERBOSE version).
That is the problem: I may have a driver which has an error handler,
but may want to have the sense printed in this case. In this case returning
in my specific error handler '-1' will not have the sense printed as it
should (and it should be printed in this case, because with no error
handler at all it would have been printed). I think that a specific error
handler doing:
dummy_err_handler()
{
return -1;
}
should do the same thing as not error handler at all.
If you want some sense not to be printed for the st driver, you should do this
by making st_interpret_sense() return 0 instead of -1, not by changing the
generic error handler.
--
Manuel Bouyer, LIP6, Universite Paris VI. Manuel.Bouyer@lip6.fr
--