[sane-devel] Default path for USB device .conf files

Henning Meier-Geinitz henning at meier-geinitz.de
Sat Jun 22 10:13:24 BST 2002


Hi,

On Fri, Jun 21, 2002 at 05:02:40PM -0500, Frank Zago wrote:
> Is there a good reason to have this in the configuration files, 
> alongside with /dev/scanner?

Yes :-)

> Couldn't the code in sane-find-scanner be reused in the backends?
> eg:
>   sanei_find_scanner(attach_one);

You mean sanei_usb_find_devices()? 

With newer Linux kernels, automatic detection works. That means, the
entries "usb vendor product" in the configuration files will lead to a
call of sanei_usb_find_devices and this one will call the backend's
attach function. In this case the explicit devices in the config files
aren't necessary.

However, this doesn't work with older Linux kernels and any other
operating system, beacuse they don't have a way to ask the kernel
about the vendor and product ids of a given scanner device.

With older Linux kernels, sane-find-scanner can't either return the
vendor and product ids.

So the explicit device names are just work-arounds.

Bye,
  Henning



More information about the sane-devel mailing list