How to detect usb storage arrival and its mount path from C

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
Last edited on
This isn't really a C/C++ question.

I'd try on a Linux forum. But I'd imagine either you have to setup a kernel signal hook, or poll.
whether this section is not "UNIX/Linux Programming". whether other questions such as "How to write a port scanner" is a really C/C++ Question?
English please.

And yes, that other question is debatable. However, they asked for programming advice on where to start.

I'd look at how to either poll for new devices, or to do a kernel hook.
http://www.cplusplus.com/forum/articles/1295/
Last edited on
Topic archived. No new replies allowed.