Re: fpathconf kernel panic
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com 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. FWIW, the FreeBSD fix is technically wrong. -- Terry _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... http://projects.info-pull.com/mokb/MOKB-09-11-2006.html 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-). This email sent to site_archiver@lists.apple.com
participants (1)
-
Terry Lambert