LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to detect usb storage arrival and its mount path (http://www.linuxquestions.org/questions/linux-newbie-8/how-to-detect-usb-storage-arrival-and-its-mount-path-675818/)

mostafa 10-12-2008 07:50 AM

How to detect usb storage arrival and its mount path
 
Hi, I am a newbi to linux,
i wana to write a program in C that can detect arrival of a usb flash memory. I want also to find the actual mount point of new inserted flash disk. can anyone help me?
thanks a lot

TwinReverb 10-12-2008 09:10 AM

It's possible to detect the insertion of a USB device simply by watching /var/log/dmesg /var/log/messages /var/log/syslog etc. There are also ways to include udev, hal, and/or messagebus hooks (see appropriate project websites).

mostafa 10-12-2008 12:14 PM

Thanks a lot. but there is not any appropriate API such as Windows?


All times are GMT -5. The time now is 05:33 AM.