HAL device removal success
Matthew Mastracci
matt at aclaro.com
Wed Jan 14 08:02:37 EET 2004
I tried the latest CVS version of HAL and the device insert/removal
notification works like a charm! It easily picks up my insertion of a
smartmedia card into the correct slot and places it in the device
manager.
The only bugs so far are:
1. If the device is removed *while mounted*, it still appears as
available until you umount it. I'm not sure yet if this is a kernel or
HAL bug, however.
2. Eventually, I end up getting errno=24 (EMFILE) while scanning
devices. Looks like it might be leaking file descriptors:
[W] linux/linux_class_block.c:997 detect_media() : open("/udev/hdc",
O_RDONLY|O_NONBLOCK) failed, errno=24
[W] linux/linux_class_block.c:997 detect_media() : open("/udev/hdd",
O_RDONLY|O_NONBLOCK) failed, errno=24
I think you need to add "close(fd)" right after the "if (!got_disc)"
block in detect_media() in linux_class_block.c.
--
Matthew Mastracci <matt at aclaro.com>
More information about the xdg
mailing list