Re: Is /dev/scanner still neccessary?

Jon Knight (jon@net.lut.ac.uk)
Wed, 15 Jul 1998 14:05:44 +0100 (BST)

On Wed, 15 Jul 1998, Christoph Doerbeck wrote:
> What is the best way to determine which backends support this feature.
> I realize that the "neccessity" for the /dev/scanner link was optional in the
> past, but it made installation a bit more consistant. Thanks for the
> input.

I hope auto detection isn't going to rely on /proc/scsi/scsi as those of
us beavering away on parallel port scanner backends will be a bit stuffed.

Tatty bye,

Jim'll

#!/usr/bin/perl -- -Whois++-client-in-6-lines-of-Perl -Beat-that-Z39.50!
use IO::Socket;sub w{$f=shift;$a{$f}=1;($h,$p,$q)=split("/",$f);$s=
IO::Socket::INET->new(PeerAddr=>"$h:$p")||return;print $s "$q\r\n";while(<$s>)
{next if(/^%/);if(/^# SERVER-TO-ASK/){while(<$s>){$x=$1 if/Name: (.*)\r\n$/;$y
=$1 if/Port: (.*)\r\n$/;$f="$x/$y/$q";@j=(@j,$f)if(/^# END/&&!$a{$f})}}else{
print}}close($s)}@j=shift;while(@j){w(pop(@j))}# whois++.pl host/port/query

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