scsi_id+lun -> /dev/scd??

scsi_id+lun -> /dev/scd??

Post by Ronald Balj » Fri, 23 Apr 1999 04:00:00



I am currently writing a driver for a Cygnet Infinidisk CD changer
(250 slots, 2 drives). It does the basic tasks nicely with many
things hardcoded. Now I'm replacing the dirty code, but I encountered
a little problem.

How do I find out which block device (e.g. /dev/scd[0-7]) belongs to
the drive with a particular scsi ID?

I tried opening the block devices, performing a SCSI ioctl()
to get the scsi ID and see if it matches the ID I'm searching,
but with some drives open() does not work when there is no
medium in the drive, so I cannot perform the ioctl()...

Can anyone point me in the right direction?

Cheers,
Ronald

 
 
 

scsi_id+lun -> /dev/scd??

Post by Ronald Balj » Fri, 23 Apr 1999 04:00:00



>but with some drives open() does not work when there is no
>medium in the drive, so I cannot perform the ioctl()...

Just found out it does work when O_NDELAY is used. However I'm
still open for nicer solutions... ;-)

Cheers,
Ronald

 
 
 

1. Diff between /dev/scd? and /dev/sr?

What is the "real" differences between using /dev/scd0 and /dev/sr0 for
the cdrom(s)?  I know that refering to /dev/scd0 works but the YAST
sys admin to "integrate hardware" displays /dev/sr? to link /dev/sr0
to /dev/cdrom.  Is /dev/sr? supposed to be referring to a cd-writer?

No man pages for /dev or /dev/scd* or /dev/sr* or devices/filesystem
on my system.

And if one has /dev/scd0 & /dev/scd1, then the cdrom recorder can be
referenced as /dev/sr0 ??  I've used /dev/scd2 for the cd-writer when
using cdrecord and that works....

2. Problems running Apache and Oracle 8

3. ide-scsi: /dev/sg device but no corresponding /dev/scd

4. appending title to postscript file on unix

5. HELP: 2>&1 > /dev/null != 2>&- > /dev/null ???

6. Telnet Session

7. >/dev/msglog 2<>/dev/msglog </dev/console

8. PatchPro downloading already installed patches

9. read blocking for really long time on /dev/scd?

10. dev_tint, dev->family, dev->pa_* removed when?

11. setting 2>&1 >>/dev/null for a chunk of script

12. Nowhere Man >> Unix Man 2>/dev/null :-)