On Thu, Sep 14, 2006 at 12:32:29PM -0400, Keppler Alecrim wrote: > On 9/14/06, Greg KH <greg@xxxxxxxxx> wrote: > > > >On Thu, Sep 14, 2006 at 09:53:33AM -0400, Keppler Alecrim wrote: > >> Hi all , > >> I'm trying to create a module to list all usb devices like > >> /proc/bus/usb/devices read function. > > > >Why do you want to do this? > > > I'm trying block kernel boot(/sbin/init) if a specfic USB is not > plugged.Like a USBKEY,but I need to check devices plugged and theirs serial > number. You can do that from userspace in an initramfs, don't do that within the kernel itself. > >The main structs are on include/linux/usb.h,including usb_device. What > >> variable contain all usb devices? > > > >Depending on the kernel version, you might be able to do this, and you > >might not. What kernel version are you using? > > > I'm using 2.6.15.7. Ah, no, sorry, the ability to walk the USB device list isn't possible outside of the USB core anymore. In 2.4, it's still possible I think. good luck, greg k-h -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/