On Sat, Dec 22, 2007 at 05:58:24PM +0100, Sjoerd Simons wrote:
Unfortunately with this patch, iff some other program called CDROM_MEDIA_CHANGED then hal won't detect the change...
Well, the current method is equally broken. If the tray is closed and the drive doesn't support CDROM_MEDIA_CHANGED, it assumes that there is media. In fact, as long as the tray is actually closed, it assumes there is media. My version at least works some of the time, and it has the pleasant side effect of reducing the number of wakeups.
The way I see it, there are only two other solutions: implement the MMC-2 API, as the comment in the source code (which may or may not solve the bug), or use the patch and make the kernel report CDROM_MEDIA_CHANGED per-process. I think simply using the patch is an improvement.
-- brian m. carlson / brian with sandals: Houston, Texas, US +1 713 440 7475 | http://crustytoothpaste.ath.cx/~bmc | My opinion only a typesetting engine: http://crustytoothpaste.ath.cx/~bmc/code/thwack OpenPGP: RSA v4 4096b 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
signature.asc
Description: Digital signature