On Wed, 26 Nov 2003, Stephen J. Gowdy wrote:

> Try reading the hotplug docs (http://linux-hotplug.sf.net ).
> 
> On Wed, 26 Nov 2003, Quynh Nguyen Anh wrote:
> 
> > Hello,
> >
> > I am writing a program, and I want it to know immediately when user
> > insert a UsbKey memory (or a Compact Flash Card to a USB Card Reader
> > attached to USB port of the machine).
> >
> > But I dont know how to capture that "insertion event". It is best to do
> > everything in user space (it is inconvenient for user to change/load
> > kernel module). May anybody please tell show me the solution?
> >
> > Thank you very much for your kind helps,
> > Nguyen

Are you sure that's the right approach?  As I understand it, a hotplug 
event occurs when the card reader is attached to the computer, _not_ when 
a card is inserted into the reader.

In fact, I don't think the card reader informs the computer at all when a 
card is inserted.  The only way to find out when that happens may be to 
poll for it continually.

Alan Stern



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to