Subject: Re: An easy way to check for new disks?
To: None <current-users@netbsd.org>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: current-users
Date: 07/31/2002 20:01:17
On Wed, Jul 31, 2002 at 01:36:51PM -0400, gabriel rosenkoetter wrote:
> On Mon, Jul 15, 2002 at 07:15:36PM -0700, Stephen Ma wrote:
> > If polling is OK for you, then "scsictl <blah> tur" seems to work. 
> 
> Hrm. Do both my CD-ROMs just suck, or is it rather uncommon for
> CD-ROMs to support this ioctl?
> 
> Witness:
> 
> grappa:binary/kernel# dmesg | grep ^'cd. at'
> cd0 at scsibus0 target 1 lun 0: <PLEXTOR, CD-R   PX-W1210S, 1.01> SCSI2 5/cdrom removable
> cd1 at scsibus0 target 3 lun 0: <MATSHITA, CD-ROM CR-8012, 1.0g> SCSI2 5/cdrom removable
> grappa:binary/kernel# dmesg | grep ahc
> ahc0 at pci0 dev 17 function 0
> ahc0: interrupting at irq 15
> ahc0: aic7880 Single Channel A, SCSI Id=7, 16/255 SCBs
> scsibus0 at ahc0: 8 targets, 8 luns per target
> grappa:binary/kernel# scsictl /dev/cd0d tur
> scsictl: /dev/cd0d: Operation not supported by device
> grappa:binary/kernel# scsictl /dev/cd1d tur
> scsictl: /dev/cd1d: Operation not supported by device

Use /dev/rcd0d. If there is no CD in the drive you can only open the raw
character device.

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
--