Domain: csiro.au
Stories and comments across the archive that link to csiro.au.
Comments · 301
-
How to pick major and minor #s for new driver?
solution : Richard Gooch's brilliant work : devfs.
Really cool (I wish Linus said why he didn't include it in the official 2.2 tree, though he said at one point (circa 2.1.105 ?) that he was considering it). FWIW, I'd be quite unsurprised to see some devfs-based distributions out there soon (I'm speculating the Bero/Mandrake folks would be the kind of people to attempt this first).
On my (work) machine, "ls /dev | wc" yields 52 entries (that makes 7 lines x 80 characters, pretty manageable, isn't it ?), while "ls /dev/**/* | wc" gives 422 devices total (and I'm still running with the glibc2.0 compatibility symlinks, together with a few custom links I had to do to support legacy stuff [call this laziness]). Yet almost all the device nodes there are functional and mean there's actually a device behind.
(now, what does this have with major/minor ? Easy, the devfs support routines either use the legacy magic numbers, if so requested by the drivers, or can assign new ones on the fly, as available. Either way, major/minor is now an (almost) irrelevant feature, only the device node counts).
(Oh, yes, Solaris' been doing something quite similar for some time, though not that bold and confident, some other OSes may do too, but I'm quite an ignorant).
-- Cyrille