tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: new errno ?





On Fri, Jul 6, 2018, 2:10 PM Greg Troxel <gdt%lexort.com@localhost> wrote:

Phil Nelson <phil%NetBSD.org@localhost> writes:

> Hello,
>
>     In working on the 802.11 refresh, I ran into a new errno code from FreeBSD:
>
> #define EDOOFUS         88              /* Programming error */
>
>     Shall we add this one?  (Most likely with a different number since 88 is taken
> in the NetBSD errno.h.)
>
>    I could use EPROTO instead, but ....

My immediate reaction is not to add it. It's pretty clearly not in
posix, unlikely to be added, and sounds unprofessional.

Poul-Henning added it to differentiate between potentially valid but not in this combo (EINVAL or EFAULT) and args that are clearly programming errors (EDOOFUS), but in code that couldn't just panic. 

It seems like it would be used in cases where there is a KASSERT in the
non-DIAGNOSTIC case.  I might just map it to EFAULT or EINVAL.

Not a terrible choice.

Warner


Home | Main Index | Thread Index | Old Index