[sane-devel] Possible to make test backend to slow down?

r. a. schmied uwppp at flash.net
Wed Jun 12 01:34:37 BST 2019

Povilas Kanapickas wrote:
> Hi,
> On 2019-06-10 19:26, r. a. schmied wrote:
>>in particular genesys_gl847
>>a query or two about <backend>.conf file
>> 1) do all, most, some backends support such runtime argument
>>    alterations?
> Looks like the genesys backend reads this genesys.conf configuration
> file by calling sanei_configure_attach. It's called by 10 backends, so I
> suppose that many backends support this functionality.
>> 2) i see scanimage is checking for and reading ./genesys.conf
>>    and /opt/csw/etc/sane.d/genesys.conf
>> 3) i've tried to enter options in ./genesys.conf, but have
>>    not been able to get them to a) work or b) cause an
>>    error or warning.  is there anyplace in the sane documentation
>>    world that defines/describes the format for these arguments
>>    placed in a <backend.conf> file?
>>    i seem to think i've seen something like that but i'm not
>>    able to re-find it!  rtfm'ed sane.7, scanimage, sane-genesys
>>    sane-test and grep'ed around looking for '\.conf'
>>    ah-ha! sane-u12 -- but those lines don't work either
>>    tried lots of variations including
>>          option='flag:arg'
>>          option flag arg
>>          option -flag=arg
>>          option="-flag arg"
> I don't know this area at all, but from the documentation of
> sanei_configure_attach:
> '''
> Parse configuration file, reading configuration options and trying to
> attach devices found in file.
> The option are gathered in a single configuration structure. Each time a
> line holds a value that is not an option, the attach function is called
> with the name found and the configuration structure with it's current
> values.
> '''
> The reason you're not seeing any error messages is that their severity
> is low. Try setting SANE_DEBUG_SANEI_CONFIG=8 environment variable
> before running scanimage.
>>if anyone provides guidance even if pointer(s) to relevant code
>>i will take/make time to write-up a manpageish file and submit
>>for incorporation ...
> That would be great, thank you.
> Regards,
> Povilas

Povilas and interested saners

so it looks to me like the genesys usb conf file is not consistent
with the processing expected and coded in sanei_configure_attach

seems sanei_configure_attach looks only for the token 'option' and
when finding 'usb 0x04a9 0x1905' or any of the other lines it calls
attach.  why it fails to recognize the option lines in ./genesys.conf
is still unclear maybe my sun sol10 is using a broken strncmp
-- so i need to check that

what attach does or attempts to do is still to be determined.

notice that the u12.conf file (example) has usb in sqr brackets [usb]
and then lists option lines.  plus the test.conf file as an example
does not include the token 'option' at all, instead listing the
option name followed by the option value to use.

still looking ...


More information about the sane-devel mailing list