lkml.org 
[lkml]   [2000]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: EJECT ioctl fails on empty SCSI CD-ROM
On Wed, 15 Nov 2000, James Stevenson wrote:

>
> Hi
>
> this is what i get on 2.2.17
>
> open("/dev/scd1", O_RDONLY|O_NONBLOCK) = 3
> ioctl(3, CDROMEJECT, 0xbffffc78) = 0
> close(3) = 0
>
>

>
> In local.linux-kernel-list, you wrote:
> >Apparently using the CDROMEJECT ioctl with kernel 2.4-testX fails on
> >a SCSI CD-ROM that does not have a disc in it. The errno returned
> >corresponds to the string ``No such file or directory.''
> >
> >The Linux CD-ROM Standard states that CDROMEJECT opens the drive tray.
> >It does not mention any prerequisite such as media being present.
> >
> >Is this the expected behavior? If so, I am curious to hear the rationale
> >behind it.
>

Well the open fails with ENOMEDIUM (errno 123). This is hardly appropriate
since you can't insert any "media" on some machines without a paperclip.

readlink("/dev/cdrom", "", 256) = 9
open("/dev/scd0", O_RDONLY) = -1 ERRNO_123 (errno 123)



Cheers,
Dick Johnson

Penguin : Linux version 2.4.0 on an i686 machine (799.54 BogoMips).

"Memory is like gasoline. You use it up when you are running. Of
course you get it all back when you reboot..."; Actual explanation
obtained from the Micro$oft help desk.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:45    [W:0.037 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site