tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: ifmedia change



    Date:        Mon, 13 May 2019 18:22:28 +0900
    From:        Masanobu SAITOH <msaitoh%execsw.org@localhost>
    Message-ID:  <6bc1e74a-efda-6bef-d478-99c8a2d5c4e7%execsw.org@localhost>

  | Isn't that deny any type of OXXXX change, is that?

Yes, but only the name ... the name you use to rename the old ioctl's
(and functions, structs, enums, ... anything that needs it) for use
by the in kernel compat code, and nothing else, is really irrelevant,
you could rename SIOCFOOBAR into "dead_frog" and everything would work
just as well.

But not everything is as easily able to be maintained into the future.

The 'shove in an O' convention came from CSRG in the 80's - when no-one
had any idea how long this ancient stuff would be being maintained, nor
how many times some parts would be revised, and revised again (now have OO)
abnd again (OOO).   That's a nightmare.

If instead of s/SIOCFOOBAR/SIOCOFOOBAR/ (or similar) you do
s/SIOCFOOBAR/SIOCFOOBAR_80/ (or whichever most recent released
version uses the ioctl (or whatever) you're changing) then that
name never needs to alter again - and it is blindingly obvious when
reading the code just which system the compat code is keeping track
of, so when the older NetBSD 1.4 code calls the NetBSD 8 code to
do something (and then the 8 code translates that to current) it
is clear to anyone looking exactly what is happening - rather than
having to futz round with counting O's and tring to work out for
each identifier (some they don't all get updated in sync) how many
O's represents which version of the code.

kre




Home | Main Index | Thread Index | Old Index