[sane-devel] devfs and scanner detection

Henning Meier-Geinitz henning@meier-geinitz.de
Sun, 17 Aug 2003 21:46:18 +0200


On Sun, Aug 17, 2003 at 10:37:51PM +0800, Mr E_T wrote:
> The problem as I said is that the usb module does a directory listing b4 opening
> the device file Whereas it should just try opening it.

It shouldn't. If the device file is not there, SANE thinks there is no
device. SANE can't open all possible device files because the kernel
takes too long. We did this in earlier versions but wainting more than
30 seconds for a "scanimage -L" when devfs is used is just not

Shouldn't hotplug care for autoloading the scanner module when the
scanner is plugged in? If that doesn't work for some reason, you could
also add a link /dev/usb/scanner --> /dev/usb/scanner0.

> This should cause the kernel to attempt to create the device if it does not
> exist.

The only way to find out quickly if a device (possibly) exists with
devfs is to look if the device file is there.