On Thu, 22 Feb 2007, Diego Zuccato wrote: > Hello. > > Hope it's not too OT here (suggestions for other lists welcome!). > > I'm going to develop a project where I have to handle MANY plug/unplug > events of devices with the same ID (and just a different ser#). > Think an "access key" that the user plugs to open a door: > 1) the user plugs the key > 2) the system reads some data > 3) the system updates key data > 4) the system opens the door when user unplugs key > > How do I get the "plug" event (and "unplug" too...) ? > Are there some docs I couldn't find? > As you may think the system is quite resource-constrained, so the less > sw is installed, the better.
The short answer is "hotplug events". If you are using udev then you can write scripts to do what you want. Otherwise you will have to receive the hotplug event notifications in some other way. You can try asking more questions on the linux-hotplug mailing list. Alan Stern ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Linux-usb-users@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-users