Originally Posted by Woodsman
Revision 3 works on all systems here.
Perhaps if other people with quirky optical drives find the patch useful that might provide some motivation.
As I said above, though it works, I didn't care for the solution in v3 as it felt half-done. I've had a final stab at it.
I had the inspiration that if we do a second call of CDROM_DRIVE_STATUS after the first CDROMEJECT and if it returns CDS_TRAY_OPEN then we know that there is no need to play that ugly elapsed time based "was it open or closed?" guessing game. Simple really. I don't know why it didn't occur to me from the start.
Unlike V3 this one feels 'right' to me and if Pat wanted to include it I wouldn't have any concerns.
Anyway, job done. I enjoyed that little puzzle.