Re: How to verify the existence of USB device
Samuel Ortiz <[email protected]>
| Newsgroups | gmane.linux.usb.devel |
|---|---|
| Message-ID | <[email protected]> |
Babu, Narendra (GE Healthcare) wrote: > Hi All, > > > I am a application developer on Linux. > Currently I am working on an USB application where I need to check > whether the device is connected or not. > > > Description: > > Linux kernel version 2.4 > Whenever a USB device is getting connected, hotplug will recognize this > and mount it on to a mount point "/mnt/usb" > Application will know only "/mnt/usb" as the device. > Suddenly if the user unplug the device without unmounting the device , > the mount point will still remain in the system. You get a hotplug event when the device gets removed. From your hotplug script you can then umount your filesystem, or/and notify your application about the device removal. Cheers, Samuel. ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ [email protected] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel