On errno
Garance A Drosihn
drosih at rpi.edu
Fri Apr 3 11:02:06 PDT 2009
At 9:13 AM -0700 4/1/09, Marcel Moolenaar wrote:
>On Mar 30, 2009, at 10:31 AM, Marcel Moolenaar wrote:
>
>>This begs the question: what is stopping us from adding new
>>error codes?
>
>>>kientzle@ wrote:
>>>POSIX does specify the range of allowable error codes
>>>for a lot of system calls, but not all. In my experience,
>>>straying outside of that causes more problems than it's
>>>worth.
>
>I agree that well-known system calls should not be changed
>willy-nilly. But what about error codes returned from GEOM
>or other FreeBSD-specific subsystems?
I'll make the observation that I've seen a lot of code which
calls some system routine, checks the result, and if there
was an error it just returns to the caller. Thus, a new errno
from GEOM may show up as coming from routines which are not
FreeBSD-specific.
Now, that might be a fine thing to do. I'm just saying that we
can not be sure that any new errno's will *only* show up as
coming from routines that are unique to FreeBSD.
--
Garance Alistair Drosehn = gad at gilead.netel.rpi.edu
Senior Systems Programmer or gad at freebsd.org
Rensselaer Polytechnic Institute or drosih at rpi.edu
More information about the freebsd-arch
mailing list