From owner-freebsd-bugs@FreeBSD.ORG Thu Jan 21 21:40:07 2010 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D1AC106566B for ; Thu, 21 Jan 2010 21:40:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 1C11B8FC0A for ; Thu, 21 Jan 2010 21:40:07 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id o0LLe6J1042867 for ; Thu, 21 Jan 2010 21:40:06 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id o0LLe6tD042865; Thu, 21 Jan 2010 21:40:06 GMT (envelope-from gnats) Date: Thu, 21 Jan 2010 21:40:06 GMT Message-Id: <201001212140.o0LLe6tD042865@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Efstratios Karatzas Cc: Subject: Re: bin/142911: [patch] vmstat(8) -w should produce error message if fed a negative value X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Efstratios Karatzas List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jan 2010 21:40:07 -0000 The following reply was made to PR bin/142911; it has been noted by GNATS. From: Efstratios Karatzas To: bug-followup@freebsd.org, Bruce Evans Cc: Subject: Re: bin/142911: [patch] vmstat(8) -w should produce error message if fed a negative value Date: Thu, 21 Jan 2010 23:33:00 +0200 On Thu, Jan 21, 2010 at 8:41 PM, Efstratios Karatzas wrote: > Instead of printing the limits that are acceptable here through errx(), > we could try and change the error message that strtonum() returns and > solve this ugliness at its root. That would be the right thing to do imho, > but I believe I need a commiter that agrees with me before I go around > posting PRs just to change error strings in openbsd code because *I* > don't like them. > > eg > "vmstat: -n -1: less than 0" (0 being the min value we want in this scenario) > would be a good error message. > > The same goes for the error message for a longer than our max supplied value. > > What do you think? > Nevermind about that, I just read the code of strtonum() and understood why my idea cannot be implemented without changing the function's interface. -- Efstratios "GPF" Karatzas