Questions on CDROM support

Anthony Barbachan (barbacha@Hinako.AMBusiness.com)
Sat, 9 Oct 1999 05:17:48 -0400


This is what I'd like to do. I'd like to modify the EIDE and/or SCSI
CDROM driver(s) to automatically mount a CD when it is inserted and unmount
and eject it when the eject button is pressed (with possibly a flag to
indicate unmount/eject only if no files are open on the CDROM or to delay
the umount/eject until after all files close on the CDROM). Unfortunately
the current need to mount/unmount the CDROM (floppy to, but I think little
that can be done about that one) is nowhere near user freindly. The
automounter doesn't really seam to suit this purpose for a few reasons. If
some process happens to be in the CD's mount directory or any decending
directories the CD is unejectable due to it being considered to be in use.
The delay before unmounting the CD thus allowing it ejection raises the very
real possibility of some quickly frustrated user(s) starting to rapidly
press the eject button, bang on it, if not worse; people are used to the
CDROM's behavior under DOS/Windows. Besides which I think mounting once on
insertion and unmounting/ejecting when the eject button is pressed is a more
efficient and elegant solution. I don't think mounting a CD, at most
almost, on insertion should be a problem since at a minimum that could be
done by polling though I think polling is ugly. But the eject button may be
a different story. So I basically have two questions mostly related to
SCSI/EIDE CDROMs though knowing about the others would be useful as well:

Do SCSI or EIDE CDROMs notify the host enviroment in any way that a CD was
inserted or that its status has changed either directly or indirectly?

Do SCSI or EIDE CDROMs notify the host enviroment in any way that the eject
button has been pressed or that its status has changed either directly or
indirectly? If not, could the pressing of the eject button be monitored
through some sort of polling?

-
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/