Re: How to verify the existence of USB device

"Babu, Narendra (GE Healthcare)" <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <520C5E108EFD11468EB43142EFEAD1BD0E6B2DD0@BANMLVEM02.e2k.ad.ge.com>
Hi Samuel,

Thanks for the reply.
You are right. We are getting the hotplug event when the device is
removed.
But the problem is, when this event is triggered I am not getting the
device node info (like /dev/sda1).
Any idea how to get this device node information at script level during
device removal ??

Thanks,
Narendra Babu H.C. 

-----Original Message-----
From: Samuel Ortiz [mailto:[email protected]] 
Sent: Tuesday, April 24, 2007 4:23 PM
To: Babu, Narendra (GE Healthcare)
Cc: [email protected]
Subject: Re: [linux-usb-devel] How to verify the existence of USB device

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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.