Loading
How to detect USB drives that has been inserted/removed?
Oct 06, 2008 By nats
Hi Everybody,
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,
Nats.
Trending Topics
| Dia - The Diagram Creation Tool | Feb 13, 2012 |
| You Need A Budget | Feb 10, 2012 |
| The Linux powered LAN Gaming House | Feb 08, 2012 |
| Creating a vDSO: the Colonel's Other Chicken | Feb 06, 2012 |
| Your CMS Is Not Your Web Site | Feb 01, 2012 |
| Casper, the Friendly (and Persistent) Ghost | Jan 31, 2012 |
- Dia
2 hours 24 min ago - Service units, is a daemon
4 hours 4 sec ago - Tcp
4 hours 19 min ago - Lamenting more development of Dia
10 hours 12 min ago - multiboot that works well for me
20 hours 2 min ago - What's a good, AFFORDABLE aka
20 hours 3 min ago - Employment Posters
1 day 11 hours ago - Sure the best distro is
1 day 12 hours ago - BeOS was the best
1 day 15 hours ago - I use Wireshark on a daily
1 day 20 hours ago





Check libusb
Libusb is here:
libusb
Here's a Java interface to it:
libusb/Java
Mitch Frazier is an Associate Editor for Linux Journal.