Subject: Re: opinion sought about minor change to error reporting in scsi_base
To: Manuel Bouyer <bouyer@antioche.lip6.fr>
From: Matthew Jacob <mjacob@feral.com>
List: tech-kern
Date: 07/02/1998 10:51:26
Manuel Bouyer wrote:
> 
 
> 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.

If you have an error handler, you should be able to decide whether to
print sense info or not.

> 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.

Ummm....

> 
> 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.

Okay... I think I see where we differ on this. I'm saying "If you have
an
error handler, and are returning saying that you didn't really have an
error, don't print any sense information unless SCSIDEBUG is set".
You're
saying "If you specify an error handler, it has to either handle all
error conditions and return 0 or errno, or explicitly punt to the
default
error handler, in which case you shouldn't beef about it printing
messages,
shooting the user thread through the head, etc....".

Hmm. Okay. I'll buy that. It means maybe a bit more code duplication,
but
it does make more sense.

Thanks. I'm enlightened now....

-matt