Subject: how facilitate custom driver development: the cdevsw/conf.c problem
To: None <tech-kern@NetBSD.ORG>
From: Michael C. Richardson <firstname.lastname@example.org>
Date: 09/07/1997 20:30:41
-----BEGIN PGP SIGNED MESSAGE-----
I know we have been through this before, but perhaps without any
resolution. Certainly none that I'm aware of.
I am just updating my IPsec development tree to 1.2G from Friday.
I notice that the major device number that I was using is not the
planetconnect satlink device. No big deal, I can patch, but it really
annoys me that I need a private copy of conf.c.
[I realize that most of arch/foo/foo/conf.c could be generated,
but I don't think we are ready for that yet]
This is what I'd like to propose: conf.c will include two files
if a kernel compile option is set. The first file should contain
additional #includes and cdev_decl, and cdev_foo_init's if required.
The second file contains the necessary stubs for cdevsw.
Now, to avoid the problem with major numbers changing, I propose
that we pad cdevsw with a bunch of reserved numbers. We are at minor
number 45 on the i386. Do other ports have much higher values? I
padded up to minor number 64, and then put the include for the cdevsw.
[oops, it is zero based. I should have stopped at 63]
That way the first "custom" number occurs at 64, and will remain
like that for at least a release or two.
It is PR #kern/4094.
:!mcr!: | Network security programming, currently
Michael Richardson | on contract with DataFellows F-Secure IPSec
WWW: email@example.com. PGP key available.
-----BEGIN PGP SIGNATURE-----
Comment: Processed by Mailcrypt 3.4, an Emacs/PGP interface
-----END PGP SIGNATURE-----