On 07/19/2011 12:53 PM, EXTERNAL Konold Martin (Firma, RtP2/TEF72)
I wrote a kernel device driver for a special purpose PCI framegrapper
device which I maintain using a kmp rpm-package.
Sofar I am grep'ing /proc/devices for the major number during
startup and create the device nodes at startup.
The documentation I found on the web and in
seems to be outdated, incomplete or contradicting.
I am now wondering what is the most uptodate and recommended method
to create the device nodes without the need for a user space
The 'optimal' way would be to request
a dynamic device number; it
should then be created automatically via udev.
Just call 'request_blkdev' (or request_chrdev) with major = 0, and
you'll get a new dynamic major number allocated.
Obviously you have to track minor numbers yourself; check for
drivers/md/dm.c for how it might be done.
Dr. Hannes Reinecke zSeries & Storage
hare(a)suse.de +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
To unsubscribe, e-mail: opensuse-kernel+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-kernel+help(a)opensuse.org