scsi_ioctl.c; opening CD-ROM drive tray when empty

From: W. Michael Petullo (mike@flyn.org)
Date: Sat May 13 2000 - 21:07:59 EST


I have been playing around with Linux version 2.3.99-pre6 for a while
now and have recently ran into a odd problem. Opening my SCSI CD-ROM
device with a flag of O_RDONLY | O_NONBLOCK is successful when there
is no media in the drive. However the ioctl call ioctl(fd, CDROMEJECT)
fails and returns -ENOENT when called on a device with no media.

scsi_ioctl.c prints the kernel message ``...kernel: Device not ready.
Make sure there is a disc in the drive'' when the CDROMEJECT ioctl is
used in the situation described above.

It doesn't seem to make sense that CDROMEJECT would fail because there
is no media in the drive.

Is this a problem in the driver? Or am I overlooking something?

Thanks!

-- 
W. Michael Petullo

:wq

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



This archive was generated by hypermail 2b29 : Mon May 15 2000 - 21:00:24 EST