On Thu, Jul 06, 2006 at 04:54:47PM +0200, mgr@xxxxxxxxxxx wrote: > Hi, > > I want to write a function that detects what USB devices are connected to > the bus. How can you do that efficiently? Can you scan the PCI bus in some > way? >From within the kernel, or from userspace? Why do you want to detect all USB devices? And why would scanning PCI devices show you USB ones? > Or what do you think of the idea of using poll() and detecting changes in > the /proc/bus/usb/devices function? That's how some programs do it, but what about the distros that don't mount usbfs in /proc/bus/usb/ anymore? Hint, use HAL for this... thanks, greg k-h -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/