NetBSD-Desktop archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

hald addon-storage keeping a fd on a raw device - cannot eject

Hi list,

I just tried to use HAL on my desktop, and so far, I am impressed by the job done to support it under NetBSD, especially when looking at the way this thing works (may I say nightmare?). Good job to those that are involved.

One question though: in hald/netbsd/addons/addon-storage.c (main()), shouldn't we close() the fd we previously open() after checking the device's state? By not doing so, addon-storage is keeping a fd on the raw device, thus blocking all attempts to eject it (either manually or through eject((1)).

I fixed it somewhat with [1]. You still can't eject() the device through HAL, but at least, we can eject it manually or by calling eject on /dev/cd0d.

I know that this part could largely be improved and is subject to races (see the comment section in the file), so it is more of a quick ugly fix than a real solution. Anyway, comments?


Jean-Yves Migeon

Home | Main Index | Thread Index | Old Index