On Sun, Feb 03, 2002 at 12:52:04PM +0000, Major A wrote: > The problem with this is that it is very platform-specific, and, even > worse, dependent on whether you use devfs or not (in devfs, in the > long run, major/minor numbers will be assigned dynamically).
I am finding the implicit assumption of this thread hard to believe. Why can't you use an ioctl to distinguish SCSI devices from things which are not SCSI devices? As far as I understood there were already precautions in place to prevent SANE from grabbing an innocent disk and thrashing it in the mistaken belief that it is a SCSI scanner. e.g. On Linux, sending SCSI_IOCTL_GET_IDLUN to /dev/scanner will have the effect of either (1) Returning some useless bus layout info which implies that it is in fact a SCSI scanner or (2) Returning EINVALID which means it's not a SCSI device. I'm not picking SCSI_IOCTL_GET_IDLUN as special, I'm sure someone who spends more time up to his/her nick in Linux sg.h will suggest a more appropriate ioctl, however this is infinitely preferable to looking at some static list of "special" major/minor numbers. Nick.
