From owner-svn-src-head@FreeBSD.ORG Sun Jul 7 08:30:19 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 886FD36B; Sun, 7 Jul 2013 08:30:19 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by mx1.freebsd.org (Postfix) with ESMTP id EFB051A88; Sun, 7 Jul 2013 08:30:18 +0000 (UTC) Received: from c122-106-156-23.carlnfd1.nsw.optusnet.com.au (c122-106-156-23.carlnfd1.nsw.optusnet.com.au [122.106.156.23]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id C978D1042308; Sun, 7 Jul 2013 18:30:15 +1000 (EST) Date: Sun, 7 Jul 2013 18:30:15 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Garrett Cooper Subject: Re: svn commit: r252672 - head/sbin/nvmecontrol In-Reply-To: <9C9CE501-055E-44A6-82BD-FFB44A04B30F@gmail.com> Message-ID: <20130707181851.E4398@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> <9C9CE501-055E-44A6-82BD-FFB44A04B30F@gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.0 cv=K8x6hFqI c=1 sm=1 a=RvpeemXtX5oA:10 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=X2rCv88ZkwkA:10 a=qlV08caaGxAhSlL7ab0A:9 a=CjuIK1q_8ugA:10 a=ebeQFi2P/qHVC0Yw9JDJ4g==:117 Cc: Jim Harris , "src-committers@FreeBSD.org" , Pawel Jakub Dawidek , Jilles Tjoelker , "svn-src-all@FreeBSD.org" , Bruce Evans , "svn-src-head@FreeBSD.org" 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: Sun, 07 Jul 2013 08:30:19 -0000 > One minor interjection and I'll butt out of the discussion... >> .... >> In another thread involving Pawel, phk campaigns against errno and asks >> for error strings (even if they are only in English). Using perror() >> did this long ago for program termination, and using the err() family >> does it better. Except possibly for program suites -- translating a >> single numeric error is easier for programs than translating an >> unstructured string. I actually prefer using binary representations >> for programs. > > Your argument would be valid if computers were parsing output and putting it in more meaningful forms, but it's invalid when humans need to understand why things fail. Many devs who consume FreeBSD don't understand the concept of man 5 errno, and if they don't, I doubt end-users of FreeBSD (and its derivatives) will. That was more than half of my argument. perror() and err() give messages that are readable by humans. Extra info in exit statuses adds less than nothing for most humans. Some programs can parse it, but most can't. Sysexits is thus useless for almost everything. Bruce