tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Device node creation when major number is dynamically allocated



Hello,

I am interested in NetBSD kernel and I have written a simple character pseudo device driver module which calculates Fibonacii numbers. It works but there is something I am not certain of. I don't know how to create device node without having to know major number allocated dynamically when the module is loaded. In earlier NetBSD versions (before module(7) framework) there was -p option to modload command specifying post-install program. One of the arguments to this program was the character device major number. Now, my module prints the character device major number to system console and I use it in mknod command. Is it good approach or there is some functionality analogous to the mentioned -p option in current NetBSD versions?

Thanks,
Jan



Home | Main Index | Thread Index | Old Index