From: Vojtech P. <vo...@su...> - 2001-06-24 19:17:02
|
On Sun, Jun 24, 2001 at 08:26:45AM -0700, James Simmons wrote: > > > simple, really. open(fd,/proc/bus/usb/devices), select(fd). Select will > > stop blocking once the file changes. > > That I got. How do you determine which device got attached or detected? You read the file contents, of course. You get a list of attached devices, all with names and vendor/product IDs, possibly more. You compare it to what you've read last time, the difference is devices that connected/disconnected. -- Vojtech Pavlik SuSE Labs |