sane 0.73 pre-test patch

David Mosberger-Tang (David.Mosberger@acm.org)
Mon, 11 May 1998 22:42:39 -0700

A pre-test patch for sane 0.73 is available at:

ftp://ftp.mostang.com/pub/sane/beta/sane-pre0.73.diff.gz

It's a patch that's relative to sane-0.72.tar.gz. This patch should
be considered experimental, so don't yell at me if it doesn't work
perfectly.

I'm making this patch available so interested folks can test the new
Linux support for specifying SCSI devices. As mentioned in an earlier
mail, under Linux it is now possible to specify a SCSI device name in
the form of:

scsi VENDOR MODEL BUS CHANNEL ID LUN

Where VENDOR and MODEL are the vendor and model strings as reported in
/proc/scsi/scsi (if the string contains whitespace, enclose the string
in double-quotes). BUS, CHANNEL, ID and LUN are the scsi bus,
channel, id and logical unit number of the device (as reported in
/proc/scsi/scsi). To allow any value for a particular field, use an
asterisks (*). Also, if you leave out the last couple of fields,
things behave as if you had specified asterisks for the left out
fields.

For example:

scsi MUSTEK * * * * *
and
scsi MUSTEK

are equivalent and both specify that any scsi device with a vendor of
MUSTEK should be probed.

As another example, the string:

scsi * * 2

would request that all scsi devices on bus number 2 are probed as
scanners.

Now the idea is that we change each backend's .conf file so that a new
user should be able to get SANE going without having to touch the
.conf files at all. To this end, the Mustek .conf file now reads like
this:

------------------------------------------------------------------
option strip-height 1

scsi MUSTEK
option linedistance-fix
option lineart-fix # lineart may be faster with this option off.

scsi SCANNER
option linedistance-fix
option lineart-fix # lineart may be faster with this option off.

/dev/scanner
option linedistance-fix
option lineart-fix # lineart may be faster with this option off.
------------------------------------------------------------------

The "scsi MUSTEK" is there to catch all older scanners whereas the
"scsi SCANNER" line is there for newer Mustek scanners that use the
"SCANNER" string as the vendor id. Note that nothing bad will
(should) happen if another vendor's scanner also identifies itself
with a vendor string of "SCANNER". This is because the Mustek backend
itself checks to make sure that it's really talking to a Mustek
scanner before proceeding. The "/dev/scanner" line remains there so
that things will continue to work on platforms that do not support the
new sanei_scsi_find_devices() call (only Linux supports this right
now).

Oliver has already made the analogous changes to the umax.conf file
and if you send me the necessary changes for the other configuration
files, I'll try to integrate them before releasing sane-0.73. Also,
if you implement sanei_scsi_find_devcies() for platforms other than
Linux, I'd be glad to integrate such code.

Happy hacking,

--david

--
Source code, list archive, and docs: http://www.mostang.com/sane/
To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com