[perl] sysopen(CD, "/dev/cd0", O_RDONLY | O_NONBLOCK) fails
Bruce Cran
bruce at cran.org.uk
Thu Mar 26 15:22:46 PDT 2009
On Thu, 26 Mar 2009 18:17:46 -0400
Robert Huff <roberthuff at rcn.com> wrote:
>
> Glen Barber writes:
>
> > > I have a perl script which seems to work fine under Linux but
> > > fails on FreeBSD. The Problem is the line:
> > >
> > > sysopen(CD, "/dev/cd0", O_RDONLY | O_NONBLOCK)
> > >
> > > After this line the following evaluates to true:
> > >
> > > $! eq "No such file or directory."
> > >
> >
> > I may be wrong, but shouldn't that be '/dev/acd0' ?
>
> /dev/cd0 = SCSI CD-ROM (and maybe other stuff).
>
> I don't know if that's what the OP has, but it is a possible
> value.
cd0 is also what you get if you use atapicam (ATAPI is SCSI over ATA
from what I remember) - for example cdrecord has traditionally used it
when writing CDs. Apparently the OP has the issue both when using
atapicam (/dev/cd0) and the normal ata node /dev/acd0.
--
Bruce Cran
More information about the freebsd-questions
mailing list