On Mon, Aug 26, 2019 at 04:20:56AM +0900, Hiroki Sato wrote: > Hi, > > Alan Somers <asom...@freebsd.org> wrote > in <201908231522.x7nfmluj068...@repo.freebsd.org>: > > as> Author: asomers > as> Date: Fri Aug 23 15:22:20 2019 > as> New Revision: 351423 > as> URL: https://svnweb.freebsd.org/changeset/base/351423 > as> > as> Log: > as> ping6: Rename options for better consistency with ping > as> > as> Now equivalent options have the same flags, and nonequivalent options > have > as> different flags. This is a prelude to merging the two commands. > as> > as> Submitted by: J?n Su?an <sucan...@gmail.com> > as> MFC: Never > as> Sponsored by: Google LLC (Google Summer of Code 2019) > as> Differential Revision: https://reviews.freebsd.org/D21345 > > I have an objection on renaming the existing option flags in ping6(8) > for compatibility with ping(8). > > Is it sufficient to add INET6 support to ping(8) with consistent > flags and keep CLI of ping6(8) backward compatible? People have used > ping6(8) for >15 years, so it is too late to rename the flags. I do > not think the renaming is useful if "ping -6 localhost" or "ping ::1" > works.
I wonder if something like this could be done: Somewhere in ping(8): bool ping6_compat; if (strcmp(argv[0], "ping6")) { ping6_compat = true; } ... if (ping6_compat) { do_this(); } else {} do_that(); } And sbin/ping/Makefile: LINKS+=sbin/ping sbin/ping6 (Note that I didn't check if sbin/ping/Makefile already set LINKS. If it doesn't, it'd be "LINKS=", of course.) Then, ping(8) and ping6(8) still are the same binary and backwards compat is maintained, at least until spray paints the neon pink bike shed. (Note: I am in no way saying this discussion is a bike shed. I'm _only_ making a joke as a nod to the idiomatic expression.) Thanks, -- Shawn Webb Cofounder / Security Engineer HardenedBSD Tor-ified Signal: +1 443-546-8752 Tor+XMPP+OTR: latt...@is.a.hacker.sx GPG Key ID: 0xFF2E67A277F8E1FA GPG Key Fingerprint: D206 BB45 15E0 9C49 0CF9 3633 C85B 0AF8 AB23 0FB2
signature.asc
Description: PGP signature