[sane-devel] Re: [PATCH] generate hal fdi file

David Zeuthen david at fubar.dk
Tue Mar 20 17:42:37 CET 2007

On Tue, 2007-03-20 at 12:17 -0400, m. allan noah wrote:
> of course, now that i think about it, this idea has the same problem
> of device ownership/locking. i suppose you could change every backend
> to lock open devices (plustek does this already?), and every front-end
> would have to send/accept signals based on lock ownership? sounds
> ugly...

My proposal includes only modifying dll.c that routes sane_open(),
sane_close() etc. to the appropriate back-end.

> > so now every linux distro that enables HAL support in SANE, locks
> > their users out of the most commonly used frontend, just to get button
> > support?

No, see my other mail. This would work just fine with any app that goes
through /usr/lib/libsane.so e.g. where sane_open() etc. is routed
through sane-backends/dll.c.

> > i would rather see a more general, non-linux specific method of
> > handling buttons. how about a daemon that runs, gets the sane device
> > list in the normal way, and then monitors each of the found devices
> > for button presses as regular sane options.

That's essentially what I propose to do except that monitoring of each
scanner happens in a separate sub process (which you want to do anyway
since it's more robust) and it integrates into the standard device model
offered by HAL, e.g. D-Bus signals and so on.


ps. HAL runs on FreeBSD and Solaris just fine and it's designed to have
other back-ends too.

More information about the sane-devel mailing list