cplusplus.com
C++ : Forum : UNIX/Linux Programming : How to detect usb storage arrival and it
 
cplusplus.com
Information
Documentation
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs


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

aghashahi (4)
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
Zaita (2292)
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.
aghashahi (4)
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?
Zaita (2292)
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.