Subject: cdev vs. bdev (32 bit dev_t)
To: None <tech-kern@NetBSD.ORG>
From: Todd Vierling <tv@NetBSD.ORG>
List: tech-kern
Date: 01/13/1998 10:18:06
grrr, I can't believe that in all this discussion I made such an oversight.
I could'a had a V8.

The current code compiles cleanly, but it assumes new devices have the same
numbering as old devices.  In a renumbered context, cdev and bdev have
different numberings on old devices!  Hence it is difficult to guarantee
that we'd get the correct number in an inlined conversion.  ...How do we be
sure?

I'd like to replace major() in kernel with bmajor() and cmajor(), which
would collapse to the same operation on `new' devices but be completely
different on `old' devices, converting numbers properly.  major() would then
become an error, but userland could still use the non-convert version of
major().  Objections?

(On a sidenote, is there an easy way to make a major() macro turn into an
error that GCC will actually display instead of just a `syntax error'?)

=====
===== Todd Vierling (Personal tv@pobox.com) =====
== "There's a myth that there is a scarcity of justice to go around, so
== that if we extend justice to 'those people,' it will somehow erode the
== quality of justice everyone else receives."  -- Maria Price