tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
How to define a major for a pseudo character device on NetBSD 1.6
Hi All,
I have a machine still stuck on NetBSD 1.6, I decided to try to port
the Tap driver to it. One question I have is where I define the major
for this new driver on 1.6.
On current I see conf/majors. Do I do this simply by adding a new
entry to the structure bellow:
#include "clockctl.h"
cdev_decl(clockctl);
struct cdevsw cdevsw[] =
{
cdev_cn_init(1,cn), /* 0: virtual console */
cdev_ctty_init(1,ctty), /* 1: controlling terminal */
cdev_mm_init(1,mm), /* 2: /dev/{null,mem,kmem,...} */
cdev_disk_init(NWD,wd), /* 3: ST506/ESDI/IDE disk */
more specifically on one of the positions listed as cdev_notdef().
I am doing this as a learning project.
Thanks in advance.
Luciano
Home |
Main Index |
Thread Index |
Old Index