> But to support this, we need some way to be informed when the state of
> the USB bus has changed.  Scanning the devfs file system can be done when
> this happens, and we can discover devices that have been unplugged by
> ENODEV, but we need a cheap way to to know when to look for new devices. We
> can't afford to do it when there is no change in the USB bus: a system
> call of any sort on a per X request basis doesn't make it for performance
> reasons, much less looking through a file system to find differences.
> 
> Is there some device we can select on that will return if the configuration
> of the USB bus changes?  This would fit the bill just fine: we can teach

Yes, poll for /proc/bus/usb/devices (needs usbdevfs mounted on
/proc/bus/usb).
It will wake you up whenever an USB device is connected or disconnected.

Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to