On Tue, Sep 15, 2009 at 6:11 PM, Kay Sievers <kay.sievers@xxxxxxxx> wrote: > On Tue, Sep 15, 2009 at 11:51, Alan Jenkins > <sourcejedi.lkml@xxxxxxxxxxxxxx> wrote: >> >> Why not use libudev (with a udev_monitor to read your socket, if >> you're not already)? You should be able to scan the block devices >> using udev_enumerate_*. >> >> In any case, make sure you do the scan _after_ you open the event >> socket. Otherwise you could miss a block device which appears at just >> the wrong time. > > It's close to this logic, which does it for video devices: > http://article.gmane.org/gmane.linux.hotplug.devel/13925 > > Kay > Alan, Kay, Thanks for the replies. My understanding is that libudev is a GPL library. As my daemon is not GPL-licensed, there will probably be legal issues with using libudev...;-( Thanks for the reminder about scanning _after_ opening the event socket. I will keep that in mind. Regards, Kam-Yung -- Soh Kam Yung my Google Reader Shared links: (http://www.google.com/reader/shared/16851815156817689753) my Google Reader Shared SFAS links: (http://www.google.com/reader/shared/user/16851815156817689753/label/sfas) -- To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html