From owner-freebsd-hackers@FreeBSD.ORG Tue May 13 07:32:37 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C089837B401 for ; Tue, 13 May 2003 07:32:37 -0700 (PDT) Received: from tinker.exit.com (tinker.exit.com [206.223.0.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0ECDE43F3F for ; Tue, 13 May 2003 07:32:36 -0700 (PDT) (envelope-from frank@exit.com) Received: from realtime.exit.com (realtime [206.223.0.5]) by tinker.exit.com (8.12.7/8.12.6) with ESMTP id h4DEWOgt012614; Tue, 13 May 2003 07:32:24 -0700 (PDT) (envelope-from frank@exit.com) Received: from realtime.exit.com (localhost [127.0.0.1]) by realtime.exit.com (8.12.9/8.12.6) with ESMTP id h4DEWO2g025625; Tue, 13 May 2003 07:32:24 -0700 (PDT) (envelope-from frank@realtime.exit.com) Received: (from frank@localhost) by realtime.exit.com (8.12.9/8.12.8/Submit) id h4DEWNLZ025624; Tue, 13 May 2003 07:32:23 -0700 (PDT) From: Frank Mayhar Message-Id: <200305131432.h4DEWNLZ025624@realtime.exit.com> In-Reply-To: <200305131101.h4DB1SKo005541@peedub.jennejohn.org> To: Gary Jennejohn Date: Tue, 13 May 2003 07:32:23 -0700 (PDT) X-Copyright0: Copyright 2003 Frank Mayhar. All Rights Reserved. X-Copyright1: Permission granted for electronic reproduction as Usenet News or email only. X-Mailer: ELM [version 2.4ME+ PL99b (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII cc: hackers@freebsd.org cc: Jordan Hubbard Subject: Re: A modest proposal for better errno values... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: frank@exit.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2003 14:32:38 -0000 Gary Jennejohn wrote: > > Bob Bishop writes: > > Hi, > > > > At 09:57 13/5/03, Jordan Hubbard wrote: > > >[stuff] > > >#define EDOOFUS 88 /* Programming error */ > > >[more stuff] > > > > Before the noise becomes unbearable, I have a question: > > > > Why isn't EINVAL appropriate to the case in question? > > > If you look at the 4 places where it's in the tree it's pretty clear that > returning EDOOFUS is meant to rub the programmer's nose in a coding error > (recursive malloc() calls, etc). > > At least the error string ("Programming error") is reasonable. > > I agree that the name isnt' too happily chosen and should be changed to > something more neutral before it shows up in more places in the tree. Um, no. If it were "EFUCKHEAD" or "EIDIOT" maybe, but EDOOFUS is about as inoffensive as it comes. But I have a better idea: Why doesn't the committer in question actually fix the problem, so that instead of four places, there are no places? Seems like this would eliminate the error as well as the reason _for_ the error. In other words, this bikeshed is aimed at absolutely the wrong target. Sigh. -- Frank Mayhar frank@exit.com http://www.exit.com/ Exit Consulting http://www.gpsclock.com/ http://www.exit.com/blog/frank/