Date: Mon, 10 Aug 2015 09:16:09 +0800 From: Marcelo Araujo <araujobsdport@gmail.com> To: Ed Schouten <ed@nuxi.nl> Cc: src-committers <src-committers@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "svn-src-head@freebsd.org" <svn-src-head@freebsd.org> Subject: Re: svn commit: r286266 - head/usr.bin/ypmatch Message-ID: <CAOfEmZgiuzVQY%2BxgnGmiRv=1OrkUqFLqfoS5V92_8XLExcTmLA@mail.gmail.com> In-Reply-To: <CABh_MK=5O=TLQmwr%2BwrdJeBVK3ATma1S1yj1_4kv-en9LzVOyA@mail.gmail.com> References: <201508040234.t742YqQA045448@repo.freebsd.org> <CABh_MK=5O=TLQmwr%2BwrdJeBVK3ATma1S1yj1_4kv-en9LzVOyA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi Ed, 2015-08-09 19:51 GMT+08:00 Ed Schouten <ed@nuxi.nl>: > Hi Marcelo, > > 2015-08-04 4:34 GMT+02:00 Marcelo Araujo <araujo@freebsd.org>: > > Sync the code with the OpenBSD version. > > That's a shame. It looks like improvements that we made to our version > have been undone because of this. > > > > -static void > > +void > > usage(void) > > This function could be static. > > > + fprintf(stderr, > > + "where\n" > > + "\tmapname may be either a mapname or a nickname for a > map.\n" > > + "\t-k prints keys as well as values.\n" > > + "\t-t inhibits map nickname translation.\n" > > + "\t-x dumps the map nickname translation table.\n"); > > It is fairly uncommon for BSD utilities to have an extensive help > output. Man pages are intended for that purpose. > > > - while ((c = getopt(argc, argv, "xd:kt")) != -1) > > + while ((c=getopt(argc, argv, "xd:kt")) != -1) > > switch (c) { > > case 'x': > > - for (i = 0; i<sizeof ypaliases/sizeof > ypaliases[0]; i++) > > + for (i=0; i<sizeof ypaliases/sizeof > ypaliases[0]; i++) > > ... > > - if ((argc-optind) < 2) > > + if ((argc-optind) < 2 ) > > ... > > - if (!domainname) > > + if (!domainname) { > > yp_get_default_domain(&domainname); > > + } > > Though the style(9) conformance of tool wasn't ideal, this change made it > worse. Agree with you! These tools are original from OpenBSD, I'm trying first to sync the code and then will rework them. I will try to send it back to upstream(OpenBSD) as soon as I have time. Some of the issues you pointed out were partially fixed at: r286394 and r286403. It doesn't include the extensive help. bde@ also pointed out it too me. I will change my approach for the next updates on yp tools, instead only to sync it with OpenBSD I will apply our style(9) changes. Thanks for the review, I will include you on the next ones if you don't mind. All the best. -- -- Marcelo Araujo (__)araujo@FreeBSD.org \\\'',)http://www.FreeBSD.org <http://www.freebsd.org/> \/ \ ^ Power To Server. .\. /_)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOfEmZgiuzVQY%2BxgnGmiRv=1OrkUqFLqfoS5V92_8XLExcTmLA>