[sane-devel] a backend test

Henning Meier-Geinitz henning@meier-geinitz.de
Sun, 17 Mar 2002 18:53:02 +0100


Hi,

On Sat, Mar 16, 2002 at 02:49:27PM +0100, mh wrote:
> I had the same problem with the plustek backend; IMHO the assumption, that a 
> call to sane_control_option() must return SANE_STATUS_INVAL if the option is 
> inactive, is simply wrong.

I'm not that sure. It depends on what's the meaning of "inactive". If 
the option value doesn't make sense under the current conditions it
may be better to not allow reading it at all.

Concerning writing, I'm quite sure that the backend should stop the
frontend from writing if SANE_CAP_SOFT_SELECT is not set.

> I also don't see a reason, why one should change code, that (as far
> as I can tell) works without problems with every frontend I've
> tested.

That something is currently working doesn't mean that it's correct. At
least that's what I have experienced during the last years :-/
I will have a second look at the pnm (and my other) backends.

> At the moment, it's tstbackend that needs some bug fixes/improvements :-)

That's true. Maybe this can be made a warning and only a test for a
status other than SANE_STATUS_GOOD.

Bye,
  Henning