Re: fpathconf kernel panic
Re: fpathconf kernel panic
- Subject: Re: fpathconf kernel panic
- From: Terry Lambert <email@hidden>
- Date: Mon, 13 Nov 2006 14:12:17 -0800
On Nov 11, 2006, at 6:03 PM, Joseph Oreste Bruni wrote:
Hi All,
Has this bug been filed in radar yet? If not, I'll file it.
http://projects.info-pull.com/mokb/MOKB-09-11-2006.html
FWIW, the FreeBSD fix is technically wrong.
EOPNOTSUPP is "operation not supported on socket"; the correct error
return value for this case, according to POSIX, is EINVAL.
<http://www.opengroup.org/onlinepubs/009695399/functions/
fpathconf.html>
It's also much easier to keep doing the right thing if you compile -
Werror -Wall, and use an enum value for DTYPE with no "default" case,
since then it becomes a compiler error when you define a new one and
forget to put it in the switch statement(s). Can't ignore a compiler
error...
I've been very tempted several times to enum the errno values, too,
given all the code I've seen that makes assumptions about what errno
values can be returned by what system call; doing that would tend to
break all such switch statements that did not have a "default:" clause
because there weren't expecting some error that got returned anyway
(e.g. such as from a filesystem KEXT, etc.). Yes, I lay awake at
night thinking these sorts of things up... 8-).
-- Terry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden