[sane-devel] Possible to make test backend to slow down?
r. a. schmied
uwppp at flash.net
Wed Jun 12 14:32:35 BST 2019
r. a. schmied wrote:
> r. a. schmied wrote:
>
>> Olaf Meeuwissen wrote:
>>
>>> Hi,
>>>
>>> Sorry, should have replied sooner :-/
>>>
>>> I've seen the follow-up by Povilas and Allan but think my reply is more
>>> appropriate here.
>>>
>>> r. a. schmied writes:
>>>
>>>
>>>> Olaf Meeuwissen wrote:
>>>>
>>>>> Jeff writes:
>>>>>
>>>>>> On my Debian system, I can edit /etc/sane.d/test.conf and change the
>>>>>> defaults.
>>>>>
>>>>>
>>>>>
>>>>> This is also documented in the manual page for the test backend.
>>>>
>>>>
>>>>
>>>> saners
>>>>
>>>> in particular genesys_gl847
>>>>
>>>> a query or two about <backend>.conf file
>>>>
>>>> 1) do all, most, some backends support such runtime argument
>>>> alterations?
>>>
>>>
>>>
>>>
>>> Each backend basically does it own thing. There is nothing that tries
>>> to impose any kind of "standard". Some backends use it to tweak their
>>> device detection routines, other to set some defauls and some do a bit
>>> of both.
>>>
>>> Your best bet is the sane-BE manual page for each BE backend. Next best
>>> are the comments in the BE.conf file, if any.
>>> # In the sources, you can find them as backend/BE.conf.in.
>>
>>
>>
>> ok i'll take a look.
>>
>> ras
>
>
> humm -- well i don't see any BE.conf (or sane-BE.man) [and did
> ignore the case as well] in sane-backends-master-e13b80fa but
> gnu grepping around i did find a bunch of *.conf files with
> option entries. the general syntax seems to be
>
> 'option' <whitespace> 'argument_name_or_id' <whitespace>
> 'argument_value'
>
> but i'll peruse these to see if there is a usb example i can
> use to confirm things.
>
>
> following up from yesterday it seems the sun sol10 sparc std c lib
> does the right thing with strncmp but why isn't the sanei_configure_attach
> function entering the inner while loop (around line 305 or so)
>
> /* search for a matching descriptor */
> i = 0;
> found = SANE_FALSE;
> while (config!=NULL && i < config->count && !found)
>
> something is still a-miss somewhere but i'm not seeing it yet.
>
> aloha
>
> ras
>
>
>
>>
>>>
>>> Hope this helps,
>>> --
>>> Olaf Meeuwissen, LPIC-2 FSF Associate Member since 2004-01-27
>>> GnuPG key: F84A2DD9/B3C0 2F47 EA19 64F4 9F13 F43E B8A4 A88A F84A 2DD9
>>> Support Free Software https://my.fsf.org/donate
>>> Join the Free Software Foundation https://my.fsf.org/join
>>>
>>
>>
>
>
povilas, olaf and interested saners
issue of altering genesys backend options at runtime using the
genesys.conf file option line solved.
./backend/genesys.c makes the call to sanei_configure_attach (sanei/sanei_config.c)
/* set configuration options structure : no option for this backend */
config.descriptors = NULL;
config.values = NULL;
config.count = 0;
so the sanei_configure_attach inner loop is not entered.
it would seem to me that sanei_configure_attach, upon detecting
the 'option' token with the condition config.count == 0 being true
should at least mention it on stderr?
i dunno that's just me.
now i'm wondering what effect(s) if any sanei_configure_attach calling
attach with lines like
option y 25.4
and
option mode Color
might have?
again it seems to me that sanei_configure_attach should probably
not pass 'option' token lines to attach especially if
config.descriptors is NULL and config.count == 0.
i'll hunt around to see if there is a good way/place to document what
i've learned about this neat feature that isn't implemented in the backend
i have to use.
aloha
ras
More information about the sane-devel
mailing list