[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

HAL device removal success



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 aclaro com>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]