[sane-devel] Scanner buttons (kind of RFC)

Oliver Rauch oliver.rauch@rauch-domain.de
Thu, 12 Sep 2002 01:59:41 +0200

Henning Meier-Geinitz schrieb:

> Depends on what is more important for you. There is not only the
> privacy problem, you don't even know if the scanner you want to use is
> the same, after you have closed the device file.
> This is especially a problem with hot-pluggable devices like USB. If
> you keep the device file open, you will get an error if the device was
> unplugged and another one was plugged during sane_open and sane_start.
> If you close the file, you have to redo all the detection and
> calibration stuff every time you open it because you don't know if
> it's the same device. If there are two identical devices connected, you
> can't even distinguish them with vendor/product ids.

When there are two identical devices you also do not know to which device you
connect to when you start the frontend.

The problems you describe are a general problem of the operating system, not
of sane. A device (USB, SCSI, ...) should not be identified as
device0, device1, device2,... but it should be identified by a unique identifier.
This at least would be possible for SCSI (scsi id + controller id). I do not know 
if a USB device can be identified by the port it is connected to.

But in general it is a bad design of the operating system routines when
the physical device is not always connected to the same logical device file.

I hope that this will be solved by filesystem improvements like devfs and the
old buggy interfaces will dissappear.


Homepage:	http://www.rauch-domain.de
sane-umax:	http://www.rauch-domain.de/sane-umax
xsane:		http://www.xsane.org
E-Mail:		mailto:Oliver.Rauch@rauch-domain.de