Backend development problems.

Dave Restall - System Administrator (dave@restall.net)
Sun, 21 Nov 1999 21:05:14 +0000

Hi,

I've started and am having a problem :-(

Why do none of the existing backends follow the standard ? They all do
far more in sane_init than the standard requires.

I created all the routines as stubs and put the single line in them
saying :-

printf("In routine ROUTINE_NAME\n");

and making them return SANE_STATUS_GOOD,

using scanimage -d pie:/dev/sg2 I would expect the following output :-

In Routine sane_init
In Routine sane_open

etc. ala page 32 of the spec.

I don't get this, all I get is :-

In Routine sane_init
scanimage: open of device pie:/dev/sg2 failed: Invalid argument

It appears to be failing in the correct place, and calling my sane_init
function, but why aren't I getting the other messages ? I put a wrapper
line round the call to sane_open in scanimage and it does get the
details and it makes the call with the correct arguments, but it never
seems to get to my section of code (I have tried using umax:/dev/sg2 and
s9036:/dev/sg2) but get the same results.

I can only think that sane_init must do more than the spec says, and the
other backends seem to bear this out.

Alternatively there must be some wrapper somewhere that parses the
arguments to sane_open and decides that it doesn't like them and simply
returns an error status before calling my test stubs.

Sorry if these are thick questions but I need some ideas as to what's
going on. I can't spend hours digging through all the source
code - I simply haven't time due to other commitments.

Regards,

Dave
mail/sane/991121.tx sane
+----------------------------------------------------------------------------+
| Dave Restall Internet Intranet Resourcing Consultancy Limited |
| Tel. +44 (0) 1287 653003 Mob. +44 (0) 973 831245 Fax. +44 (0) 1287 652546 |
| email : dave@iirc.net dave@restall.net Web : http://www.iirc.net |
+----------------------------------------------------------------------------+
| What we do not understand we do not possess. |
| -- Goethe |
+----------------------------------------------------------------------------+

--
Source code, list archive, and docs: http://www.mostang.com/sane/
To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com