[sane-devel] Suggestion to enhance log file output.

G.W. Haywood sane-devel at jubileegroup.co.uk
Mon Nov 25 09:11:55 GMT 2024


Hi there,

Thanks very much for the reply and the explanation.  All understood,
and it's surely not going to be worth a great deal of effort for the
odd occasion that a library gets corrupted.  I can't say I'm aware of
it happening here before now (in approaching 40 years of support for
busy offices), I suppose it must have done but then there's no reason
why a gremlin should prefer a library used by the scannning system.

Perhaps something like this patch to the documentation?

8<----------------------------------------------------------------------
$ diff -U3 ./Operations.html~ ./Operations.html
--- ./Operations.html~  2024-11-25 08:51:28.805536970 +0000
+++ ./Operations.html   2024-11-25 08:55:13.096924545 +0000
@@ -140,6 +140,8 @@
    is available.
  <dt><tt>SANE_STATUS_ACCESS_DENIED</tt>:<dd> Access to the device has
    been denied due to insufficient or invalid authentication.
+<dt><tt>SANE_STATUS_UNSUPPORTED</tt>:<dd> Something else went wrong.
+  It could be anything - even including a damaged executable.
  </dl>
  </blockquote>
8<----------------------------------------------------------------------

-- 

73,
Ged.

On Sun, 24 Nov 2024, Ralph Little wrote:

> This is a difficult one. Interfaces with the backends are fairly simple. I
> wasn't involved when this was formulated but I assume that the simplicity
> is deliberate on purpose to keep it flexible.
>
> Generally, I find that this error is returned from a lower level operation
> not working as intended. Some of the backends are quite complex and nuance
> in the reporting back of issues is often not really possible.
> SANE_STATUS_INVAL is a case in point. It could mean practically anything.
>
> If could be that we could expand the API somewhat to allow more verbose
> reporting from a backend through a new function call. However, although we
> could expand what such as the DLL layer can report back, it would be a bit
> of work adding that in. Also it is unlikely that backends would be updated
> to make of it, at least in the short term. Many of our backends don't even
> have maintainers.
>
> Cheers,
> Ralph
>
>
> On Sun, Nov 24, 2024 at 7:15 AM G.W. Haywood <sane-devel at jubileegroup.co.uk>
> wrote:
>
>> Hi there,
>>
>> ... upgraded to Bullseye. ... scanner wasn't found by scanimage -L.
>> ... tracked down ... damaged shared library. ... almost by accident
>> ... not really satisfied with that.
>> ...
>> http://www.sane-project.org/html/doc012.html
>> ...
>> 4.3.4 (sane_open) claims that the possible returned values are:
>>
>> SANE_STATUS_DEVICE_BUSY
>> SANE_STATUS_INVAL
>> SANE_STATUS_IO_ERROR
>> SANE_STATUS_NO_MEM
>> SANE_STATUS_ACCESS_DENIED
>>
>> but the returned value that I saw in the debug output from the command
>> ...
>> SANE_STATUS_UNSUPPORTED
>> ...


More information about the sane-devel mailing list