Subj : Re: How to detect cdrom tray status (open or closed) To : comp.os.linux From : Sybren Stuvel Date : Wed Oct 06 2004 05:05 pm Sybren Stuvel enlightened us with: > Minderbinder enlightened us with: >> Try looking for the source code of the "eject" utility > > I will. Unfortunately, my suspicions were correct. 'eject' doesn't do any detection of the tray status. It just sends a CDROMEJECT ioctl when you invoke it, and a CDROMCLOSETRAY when you pass it the '-t' option. I want to send CDROMCLOSETRAY only when it's open, and CDROMEJECT only when it's closed. Sybren -- The problem with the world is stupidity. Not saying there should be a capital punishment for stupidity, but why don't we just take the safety labels off of everything and let the problem solve itself? .