libcdio-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Libcdio-devel] open(x, O_RDONLY|O_NONBLOCK) vs. O_RDONLY) on FreeBS


From: Steven M. Schultz
Subject: Re: [Libcdio-devel] open(x, O_RDONLY|O_NONBLOCK) vs. O_RDONLY) on FreeBSD (Solaris, GNU/Linux)?
Date: Sun, 8 May 2005 15:30:43 -0700 (PDT)

On Sun, 8 May 2005, R. Bernstein wrote:

>  >    BSDI uses "O_RDONLY | O_NONBLOCK".
> 
> So line 218 of lib/driver/bsdi.c should become
>   p_env->gen.fd = open (p_env->gen.source_name, O_RDONLY|O_NONBLOCK, 0);

        That would be fine.

> Right now there is only O_RDONLY. 

        The only time it makes a difference is when the drive is empty.  If
        there's a disc in the drive then both methods will work.  But if the
        drive is empty then the kernel will fail the open unless you specify
        O_NONBLOCK (in a way that's saying you want to talk to the drive 
        rather than the media).

        Cheers,
        Steven 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]