From owner-svn-src-head@freebsd.org Mon Aug 10 01:16:10 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 17D31998365; Mon, 10 Aug 2015 01:16:10 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: from mail-ob0-x229.google.com (mail-ob0-x229.google.com [IPv6:2607:f8b0:4003:c01::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CDEE2EB7; Mon, 10 Aug 2015 01:16:09 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: by obnw1 with SMTP id w1so113234058obn.3; Sun, 09 Aug 2015 18:16:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=isnpWjBAlL4r92zUBiIoec6sZdoT83R2vKLuRz2f9h4=; b=TDnouuEy4DP79p9+ysILRwDoe+0pruWV3ycuxzyuGpRoGFQaahw5LETtQ4EW64PBCw 4NngAM5iiK8jEmul9mdfJSb9jDPfdpEhsXnP9raJSNewogfefftjIq+V7NjGxPFsNnHk SUCx4wFZjBYcy/Dp75lTB2HOwazEeufuKIeoHs98yUGcnzaKYQOmSRtp4W16ugnvS7N7 ajSc+oxAWBQOMfnXzcb3AbauIdGbky58KhfBFvsS31kRk+WTYmVL9f/vSW+SrSMHUyV1 7xgNr1SFiv+dsqCaWove1JzmUdo9FMJV9Glg+BPHmUz2pUTm/kwH6cKWbU/qqa4O9fey 7GnA== MIME-Version: 1.0 X-Received: by 10.182.211.66 with SMTP id na2mr17924516obc.43.1439169369132; Sun, 09 Aug 2015 18:16:09 -0700 (PDT) Received: by 10.202.11.193 with HTTP; Sun, 9 Aug 2015 18:16:09 -0700 (PDT) Reply-To: araujo@FreeBSD.org In-Reply-To: References: <201508040234.t742YqQA045448@repo.freebsd.org> Date: Mon, 10 Aug 2015 09:16:09 +0800 Message-ID: Subject: Re: svn commit: r286266 - head/usr.bin/ypmatch From: Marcelo Araujo To: Ed Schouten Cc: src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Aug 2015 01:16:10 -0000 Hi Ed, 2015-08-09 19:51 GMT+08:00 Ed Schouten : > Hi Marcelo, > > 2015-08-04 4:34 GMT+02:00 Marcelo Araujo : > > 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 ypaliases[0]; i++) > > + for (i=0; i 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 \/ \ ^ Power To Server. .\. /_)