kernel dev_t elimination patch for review
Robert Watson
rwatson at freebsd.org
Fri Jun 11 12:53:53 GMT 2004
On Fri, 11 Jun 2004, Poul-Henning Kamp wrote:
> http://phk.freebsd.dk/patch/dev_t.patch
>
> This patch changes "dev_t" in the kernel to "struct cdev *"
> and is 337K of boredom like:
>
> -static dev_t perfdev;
> +static struct cdev *perfdev;
>
> People who maintain cross-platform or cross-version source code in the
> kernel, should take a close look at this patch.
>
> If you don't like the way I have done it (which is mostly automated)
> you are more than welcome to commit your own patch, all you have to do
> is use "struct cdev *" instead of "dev_t", and you can do that already
> now.
>
> In about a week or so, I will commit the remaining bits of this patch.
It looks reasonable to me, although bde will no doubt point out there are
a couple of places where function declarations get too long for a line,
comments don't line up, etc.
Do you plan to eliminate udev_t in a following step and return it to
dev_t? There are some positive and negative aspecets of doing so relating
to cross-platform compatibility, one suspects, but it would be nice for
consistency purposes now that the kernel dev_t is gone.
Looks good!
Robert N M Watson FreeBSD Core Team, TrustedBSD Projects
robert at fledge.watson.org Senior Research Scientist, McAfee Research
More information about the freebsd-current
mailing list