[sane-devel] [dev] sanei_scsi_find_devices bug?

Henning Meier-Geinitz henning@meier-geinitz.de
Sun, 5 Aug 2001 13:11:58 +0200


Hi,

I have just found out that the following scanner isn't detected
automatically by sanei_scsi_find_devices:

(cat /proc/scsi/scsi/)

Attached devices: 
Host: scsi0 Channel: 00 Id: 05 Lun: 00
  Vendor: SCANNER  Model:                  Rev: V101
  Type:   Scanner                          ANSI SCSI revision: 01 CCS

The "Model" entry consists of spaces only. I have added some DBG
statements to sanei_scsi_find_devices and this looks like the following:

[mustek] sane_init: config file line 16: trying to attach scsi * * Scanner'
[sanei_debug] Setting debug level of sanei_scsi to 1.
[sanei_scsi] sanei_scsi_find_devices: vendor: (null), model: (null), type: Scanner
[sanei_scsi] sanei_scsi_find_devices: keyword scsi found (i=4)
[sanei_scsi] sanei_scsi_find_devices: int: 0
[sanei_scsi] sanei_scsi_find_devices: keyword Channel: found (i=5)
[sanei_scsi] sanei_scsi_find_devices: int: 0
[sanei_scsi] sanei_scsi_find_devices: keyword Id: found (i=6)
[sanei_scsi] sanei_scsi_find_devices: int: 5
[sanei_scsi] sanei_scsi_find_devices: keyword Lun: found (i=7)
[sanei_scsi] sanei_scsi_find_devices: int: 0
[sanei_scsi] sanei_scsi_find_devices: keyword Vendor: found (i=0)
[sanei_scsi] sanei_scsi_find_devices: string: SCANNER  Model:    
[sanei_scsi] sanei_scsi_find_devices: keyword Model: found (i=1)
[sanei_scsi] sanei_scsi_find_devices: string: Rev: V101

[sanei_scsi] sanei_scsi_find_devices: keyword Type: found (i=2)
[sanei_scsi] sanei_scsi_find_devices: string: Scanner    
[sanei_scsi] sanei_scsi_find_devices: keyword Type: found (i=2)
[sanei_scsi] sanei_scsi_find_devices: string: Scanner             

As "Rev:" isn't found until EOF, the function exits without success.
It looks like the function can't handle empty entries.

Any ideas?

Bye,
  Henning