A modest proposal for better errno values...
Gary Jennejohn
garyj at jennejohn.org
Tue May 13 04:01:41 PDT 2003
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.
---
Gary Jennejohn / garyj at jennejohn.org gj at freebsd.org gj at denx.de
More information about the freebsd-hackers
mailing list