tech-net archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: ifmedia change
Hi.
On 2019/05/14 4:09, Robert Elz wrote:
> 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
Thank you for the clarify. I fully agreed with it. It makes:
- not required to gaze to know the number of 'O's.
- not required grep old macros and replace all of them and
only required to add newly old name.
- not required to search the code to know which release is the
last release of the old ABI and just see the _XX number.
New diff:
http://www.netbsd.org/~msaitoh/ifmedia-20190514-0.dif
I renamed the following macros from the last patch:
OOSIOCSIFMEDIA -> SIOCSIFMEDIA_43
OSIOCSIFMEDIA -> SIOCSIFMEDIA_80
OSIOCGIFMEDIA -> SIOCGIFMEDIA_80
OSIOCGIFMEDIA32 -> SIOCGIFMEDIA32_80
--
-----------------------------------------------
SAITOH Masanobu (msaitoh%execsw.org@localhost
msaitoh%netbsd.org@localhost)
Home |
Main Index |
Thread Index |
Old Index