Michal Suchánek wrote: > it is completely reasonable to return ENOMEDIUM from kernel when the > tray is open and let userspace decide if it wants to attempt to close > the tray and how long it wants to wait for the tray to close (it may be > blocked/broken). > But then, what is the purpose of /proc/sys/dev/cdrom/autoclose? Just to start closing the tray? If it is true, the logic should be: If (error is ENOMEDIUM AND /proc/sys/dev/cdrom/autoclose is 1 AND tray can be closed) THEN sleep few seconds and retry Alternatively, implement also: If (error is ENOMEDIUM AND /proc/sys/dev/cdrom/autoclose is 0 AND tray can be closed) THEN close tray IF (close tray succeeded) THEN sleep few seconds and retry -- Best Regards / S pozdravem, Stanislav Brabec software developer --------------------------------------------------------------------- SUSE LINUX, s. r. o. e-mail: sbrabec@xxxxxxxx Křižíkova 148/34 (Corso IIa) tel: +49 911 7405384547 186 00 Praha 8-Karlín fax: +420 284 084 001 Czech Republic http://www.suse.cz/ PGP: 830B 40D5 9E05 35D8 5E27 6FA3 717C 209F A04F CD76 -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html