From owner-svn-src-head@FreeBSD.ORG Tue Jul 9 21:18:13 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 2307D17F; Tue, 9 Jul 2013 21:18:13 +0000 (UTC) (envelope-from jim.harris@gmail.com) Received: from mail-ea0-x22a.google.com (mail-ea0-x22a.google.com [IPv6:2a00:1450:4013:c01::22a]) by mx1.freebsd.org (Postfix) with ESMTP id 36F8B1D36; Tue, 9 Jul 2013 21:18:12 +0000 (UTC) Received: by mail-ea0-f170.google.com with SMTP id h10so4190281eaj.15 for ; Tue, 09 Jul 2013 14:18:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=8I4CDdXGRzRZ3kAqglWKD2pJHYtbvzYYW/lYpYRHgSQ=; b=WrmUqhBONnWT5YUjP4XMkDO1QbvHeb1JBJ/c9d5Pz6qRYMf/fKAPC2DGfxNmO93NQ4 KAM+7pHPoNCMJfiy/2hderWp9f7OR3abJb2vekZnpnVQb3TPOPkLQpPcD9xnaMB+HN5Y YCxiuFALZlQd4yD9NpeKQ41VEu6IiXJzXmNQV+mNLqznhoDu91qP2KUIJX1QKqBGHQ8g vq2qhDUrk1YGX/Ynpzy3hlilfYoKv6eXUh58Besw954cFNXk+ZDRAoXT/cxb6LtLYbF0 MIkoY5DgsEFLE/NzmXkLGSRhSTcP7NQG2YQRRyi9xy3VnGtCJVwkyJKps2R3JFJfFYZg y+dA== MIME-Version: 1.0 X-Received: by 10.14.204.137 with SMTP id h9mr32926383eeo.13.1373404691235; Tue, 09 Jul 2013 14:18:11 -0700 (PDT) Received: by 10.15.25.7 with HTTP; Tue, 9 Jul 2013 14:18:11 -0700 (PDT) In-Reply-To: <20130707114237.L897@besplex.bde.org> References: <201307040026.r640QOCd079203@svn.freebsd.org> <20130704105843.B982@besplex.bde.org> <20130706184249.GD25842@garage.freebsd.pl> <20130706195108.GA34684@stack.nl> <20130707114237.L897@besplex.bde.org> Date: Tue, 9 Jul 2013 14:18:11 -0700 Message-ID: Subject: Re: svn commit: r252672 - head/sbin/nvmecontrol From: Jim Harris To: Bruce Evans Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Pawel Jakub Dawidek , Jilles Tjoelker X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 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: Tue, 09 Jul 2013 21:18:13 -0000 On Sat, Jul 6, 2013 at 7:26 PM, Bruce Evans wrote: > On Sat, 6 Jul 2013, Jilles Tjoelker wrote: > > On Sat, Jul 06, 2013 at 08:42:49PM +0200, Pawel Jakub Dawidek wrote: >> >>> On Thu, Jul 04, 2013 at 11:44:28AM +1000, Bruce Evans wrote: >>> >>>> Many style bugs are visible in this patch: >>>> >>> [...] >>> >>>> - sysexits.h is used >>>> >>> [...] >>> >> >> Bruce, until sysexits(3) doesn't explicitly say it shouldn't be used, >>> please stop calling this a bug, because you are just confusing people. >>> At this point sysexits(3) actually even suggests it is blessed by >>> style(9). This is how it starts: >>> >> >> According to style(9), it is not a good practice to call exit(3) >>> with arbitrary values to indicate a failure condition when >>> ending a program. Instead, the pre-defined exit codes from >>> sysexits should be used, so the caller of the process can get a >>> rough estimation about the failure class without looking up the >>> source code. >>> >> > This is just another bug in sysexits(3). This is not according to > style(9), since style(9) was fixed to not say that after I complained > previously :-). It has never been normal practice to use sysexits(3), > but someone who likes it added recommendations to use it to style(9) when > they added the man pages for sysexits(3). Before that, it was > so rarely used that it had no man page. > To add to the areas of confusion already stated in this thread, err(3) explicitly recommends using sysexits(3) and uses it in all of the examples. I decided to use 0/1 instead of sysexits since it seems most appropriate based on the discussion here and other examples in sbin. I incorporated these changes as well as addressing some of Bruce's other feedback in r253109. Thanks, -Jim