How to detect USB drives that has been inserted/removed?
I am new to Linux. I have to write a C library which has to detect USB device such as Mass Storage devices that has been inserted/removed. And it has to notify to a Java application with Mass Storage Device's Label, Device ID. And as well as once it has been identified, it has to mount to a location and it has to send the mounted location to Java App.
I have tried using iNotify and by reading /proc/partitions. But i didnt succeed. Because iNotify is not giving notification for /proc/partitions as well as i m unable to read /proc/partitions through File IO in C.
Or Is there any built-in library which we can register for USB notification?
Please provide me suggestion to accomplish this task.
Thanks and Regards,
|Privacy Is Personal||Jul 02, 2015|
|July 2015 Issue of Linux Journal: Mobile||Jul 01, 2015|
|July 2015 Video Preview||Jul 01, 2015|
|PHP for Non-Developers||Jun 30, 2015|
|A Code Boot Camp for Underprivileged Kids||Jun 30, 2015|
|Comprehensive Identity Management and Audit for Red Hat Enterprise Linux||Jun 29, 2015|
- Privacy Is Personal
- PHP for Non-Developers
- Secure Server Deployments in Hostile Territory
- Linux Kernel 4.1 Released
- July 2015 Issue of Linux Journal: Mobile
- Django Templates
- Comprehensive Identity Management and Audit for Red Hat Enterprise Linux
- A Code Boot Camp for Underprivileged Kids
- Practical Books for the Most Technical People on the Planet
- Attack of the Drones