I use libudev to monitor storage devices (usb keys, etc) so that when they are modified I get a notification in my program. Libudev tells you whether or not a device has been added,removed,etc and gives you the device node. For example, if I add an SD card in my system, libudev will tell me that "/dev/mmcblk0p1" was added. When this happens, I want to get the mount point of the device as well. So I check /proc/mounts to see what mount path the device has been mapped to.
While this seems to work okay, I'm not sure whether libudev sends me the signal that a device has been added before it mounts the device, after it mounts the device or somewhere in between (which would mean that me checking the /proc/mounts file right after I get the signal is an unreliable method).
So my question is does anyone know when libudev sends the signal, and whether or not the method I use to get the device's mount path is reliable?
If it isn't, is there another way to get the mount path given the device node that is reliable?
Regards,
Pris
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)