how to see the minor numbers allocated to a driver?

Greg KH greg at kroah.com
Wed May 4 11:32:51 EDT 2011


On Wed, May 04, 2011 at 09:40:52AM -0400, Robert P. J. Day wrote:
> 
>   something i was curious about way back when -- given that
> register_chrdev_region() and alloc_chrdev_region() allow one to
> specify a range of minor numbers desired that doesn't necessarily have
> to start at zero, is there a way from user space to see what those
> numbers are after the device registration is complete?

/sys/dev/char/ after the driver has registered those minor numbers with
the driver core is your best bet.

hope this helps,

greg k-h



More information about the Kernelnewbies mailing list