Date: Thu, 21 Jan 2010 21:40:06 GMT From: Efstratios Karatzas <gpf.kira@gmail.com> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/142911: [patch] vmstat(8) -w should produce error message if fed a negative value Message-ID: <201001212140.o0LLe6tD042865@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/142911; it has been noted by GNATS. From: Efstratios Karatzas <gpf.kira@gmail.com> To: bug-followup@freebsd.org, Bruce Evans <brde@optusnet.com.au> 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 <gpf.kira@gmail.com> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001212140.o0LLe6tD042865>