[sane-devel] sanei_config_attach_matching_devices() for USB

Major A andras@users.sourceforge.net
Sun, 3 Feb 2002 17:28:25 +0000


> See sanei_usb_attach_matching_devices (in sanei_usb.h and
> sanei_usb.c). We once hat the test for "usb * *" in
> sanei_config_attach_matching_devices() but in this case we must link
> every backend (even the SCSI backends) to sanei_usb.o and every USB
> backend to sanei_scsi. This should be avoided.

OK, thanks, that makes sense.

> We had a discussion about usbdevfs when I first wrote sanei_usb. The
> problem was that there is no correlation between the devices entries
> and the /dev/usb/scanner files. If you find a different approach,
> patches are welcome.

That's true, unfortunately, as I just found out. In that case, my only
suggestion is to have the scanner kernel module create a /proc entry
that shows all recognized scanners, with their filenames. This of
course only works with devfs, because without devfs the module only
knows major/minor numbers, not which device files correspond to these.

  Andras

===========================================================================
Major Andras
    e-mail: andras@users.sourceforge.net
    www:    http://andras.webhop.org/
===========================================================================