Re: /proc/scsi/scsi

Bernd Seemann (bernd@seebaer.ruhr.de)
Thu, 9 Apr 1998 22:05:33 +0200 (MET DST)

Hello.

On Tue, 7 Apr 1998 Oliver.Rauch@Wolfsburg.DE wrote:

> I am writing a little routine that reads /proc/scsi/scsi
> and tries to find out on which device the scanner is connected.

Why you don't use the scsi inquiry command on /dev/sg* ? Is there any
problem that I do not see?

I have written (stolen ;-) a very short program under linux that uses the
scsi generic devices /dev/sg* and lists the scsi inquiry result like the
following example:

> scsiinfo /dev/sg0
QUANTUM LP240S GM240S01X6.4 040392 142231934661
device is loaded

> scsiinfo /dev/sg1
QUANTUM LPS540S 590008/05/93185331053867
device is loaded

Could this solve the problem?

Bye, Bernd.

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