detect usb device insert/remove and get device node from "C" program
My application (running on an embedded MIPS based platform, running linux and has 2 USB ports) needs to detect USB devices such as Mass Storage devices that has been inserted/removed. The application need to know that a usb device has been inserted/removed along with the device node (like /dev/sda1, /dev/sdb1 etc). Then I need to mount this device node to a known location in the application.
Is there a way to get these 2 things, from my application, which is in C language.
1) usb device inserted/removed (Is there a way like an interrupt or polling).
2) device node
Thanks in advance,