Oliver Rauch wrote: > > Henning Meier-Geinitz wrote: > > > I have no idea how to test if the device is a SCSI device without > > sending data to it. Maybe we can add some magic to look at the real > > device name if /dev/scanner is used but ad this can something like > > /dev/sga, /dev/sg1, /dev/uk0, /dev/ss0 and many many more it's not > > that easy. And nobody prevents the user to create > > /dev/myownscsiscanner with the correct major/minor numbers. > > > > Any ideas? > > > > I think we could and should create a function > sanei_identify_device(char *device_file) > > that has some > #IFDEF _LINUX_ > test for major/minor number for SCSI/USB/PARALLEL/... > #...
Such a call might help backends to figure out, if they should use sanei_usb or sanei_scsi or some other sanei library. But adding a stat call to sanei_scsi_open and checking if the filename indeed points to an SG device might more raliably avoid the crash. But I'd also like to know, where exactly the crash occurs. As Henning wrote, can somebody provide gdb output or a log from SANE_DEBID_SANEI_SCSI ? Abel
