On Tue, 2004-05-25 at 09:23, Alan Cox wrote: > On Tue, May 25, 2004 at 08:56:38AM +0200, Arjan van de Ven wrote: > > The problem it tries to solve is hard. It will require fundamental > > kernel changes to get right I fear, and just trying to paper over the > > underlying kernel with a small module ain't gonna fix it, it will remain > > just papering over ;( > > Or user space 8). volumagic proves you can do it that way for only a small > hit > I've just put some code in HAL to detect whether the eject button is pressed (using MMC-2) so ideally HAL would relay this to gnome-vfs which would emit a PreUnmount signal such that apps closes their files and then it can do the unmount(1), eject(1) dance. Thing is, I don't know how many drives correctly implement this MMC-2 bit, any insight? Maybe it would be smarter to get HAL to use some of the volumagic code [1], since I guess a similar technique can be used for partitions on a USB drive to give safe removal when the drive is not in use. Would this be a good idea? Or are there kernel changes on the horizon to solve all of these problems? Thanks, David [1] : I think it can be done without changing the HAL API, which means vendors can ship HAL with or without volumagic stuff, here's the thread http://freedesktop.org/pipermail/hal/2004-May/000244.html