[perl] sysopen(CD, "/dev/cd0", O_RDONLY | O_NONBLOCK) fails

Glen Barber glen.j.barber at gmail.com
Thu Mar 26 14:56:33 PDT 2009


On Thu, Mar 26, 2009 at 5:20 PM, Tobias Rehbein <tobias.rehbein at web.de> wrote:
> Hi all.
>
> 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 is readable and writable for me. I rebooted multiple times and tried
> with and without atapicam.
>
>        sysopen(CD, "/dev/acd0", O_RDONLY | O_NONBLOCK)
>
> fails either. So what's up here? Is sysopen a linuxism?
>
> Any help is greatly appreciated.
>
> Regards Tobias


-- 
Glen Barber


More information about the freebsd-questions mailing list