On 07/19/2011 12:53 PM, EXTERNAL Konold Martin (Firma, RtP2/TEF72) wrote:
Hi there,
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.
Argl.
The documentation I found on the web and in /usr/src/linux/Documentations 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 setup script?
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. Cheers, Hannes -- Dr. Hannes Reinecke zSeries & Storage hare@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@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org