[sane-devel] All sane frontends segfault with my HP 5200C
Henning Meier-Geinitz
henning at meier-geinitz.de
Sun Feb 3 16:38:21 GMT 2002
Hi,
On Sun, Feb 03, 2002 at 12:52:04PM +0000, Major A wrote:
> The approach I have taken in coolscan2 is to use device names with a
> prefix:
>
> usb:/dev/usb/scanner0
>
> for instance. scanimage -L works (well, only for SCSI scanners at the
> moment) because of the following code:
>
> try_interface = CS2_INTERFACE_SCSI;
> sanei_config_attach_matching_devices ("scsi Nikon *", cs2_attach);
> try_interface = CS2_INTERFACE_USB;
> sanei_config_attach_matching_devices ("usb Nikon *", cs2_attach);
>
> I think that this approach is more robust than relying on interface
> information obtained from the device file's major/minor number or such
> like.
A similar approach is used in every backend that uses SCSI and USB
scanners. But this doesn't solve the /dev/scanner -->
/dev/usb/scanner0 problem, because this is triggered by the SCSI
backends. So this means changing every SCSI backend in the world.
That's the sort of thing I wanted to avoid by having a check inside
the sanei_scsi and sanei_usb layers.
The above code probably doesn't work for USB scanners because
sanei_usb_config_attach_atching_devices does only check for "scsi *".
Try sanei_usb_attach_matching_devices().
Bye,
Henning
More information about the sane-devel
mailing list