Newbie to SANE - scanimage patch

Simon Huggins (huggie@dial.pipex.com)
Thu, 6 May 1999 17:20:42 +0100

--ReaqsoxgOBHFXBhH
Content-Type: text/plain; charset=us-ascii

Hi,

I just got my first scanner and tried it with linux and realised that
SANE is *true* - it is easy!

I'd like to thank you for writing it and also for the webpages which
helped make my mind up on the scanner to get in the first place.

Not understanding SCSI devices when I installed SANE I didn't really
realise that scanimage would just fail silently when I used
--list-devices (-L). I followed the article in the Linux Journal and so
hadn't read the bit that told me to use tools/find-scanner because that
article tells you to type scanimage --list-devices

I did get a bit worried when nothing came up and that led me on a
documentation hunt and I found find-scanner and ran it as it suggested,
as root and hey presto it was just that /dev/sga was 600 and not
readable by me.

The following is a patch which merely tells the user of scanimage that
if the list of found devices is empty that they might like to try
running it as root. I tried to keep to your style of formatting (not my
chosen one but hey) and hope it'd be useful.

-- 
----------(   Trees moving back and forth are what make the wind   )----------
Simon ----(                         blow.                          )---- Nomis

--ReaqsoxgOBHFXBhH Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=sanepatch

diff -urN sane-1.0.1/frontend/scanimage.c sane-1.0.1-patched/frontend/scanimage.c --- sane-1.0.1/frontend/scanimage.c Fri Mar 5 06:13:49 1999 +++ sane-1.0.1-patched/frontend/scanimage.c Thu May 6 16:48:04 1999 @@ -1097,6 +1097,10 @@ device_list[i]->name, device_list[i]->vendor, device_list[i]->model, device_list[i]->type); } + if (i==0) // No devices found + { + puts("No devices found! You may want to run this program as the superuser to find\nall devices."); + } exit (0); }

--ReaqsoxgOBHFXBhH--

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