From owner-freebsd-hackers Sun Dec 14 11:23:00 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id LAA01891 for hackers-outgoing; Sun, 14 Dec 1997 11:23:00 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from ns1.yes.no (ns1.yes.no [195.119.24.10]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id LAA01880 for ; Sun, 14 Dec 1997 11:22:53 -0800 (PST) (envelope-from eivind@bitbox.follo.net) Received: from bitbox.follo.net (bitbox.follo.net [194.198.43.36]) by ns1.yes.no (8.8.7/8.8.7) with ESMTP id TAA10791 for ; Sun, 14 Dec 1997 19:22:51 GMT Received: (from eivind@localhost) by bitbox.follo.net (8.8.6/8.8.6) id UAA13250; Sun, 14 Dec 1997 20:22:50 +0100 (MET) X-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) To: freebsd-hackers@FreeBSD.ORG Subject: Re: New option model (was Re: cvs commit: src/sys/kern kern_exit.c) References: <199712071816.KAA21840@freefall.freebsd.org> <19971208091729.40125@uriah.heep.sax.de> <863ek4p1tx.fsf_-_@bitbox.follo.net> <199712100013.BAA04827@uriah.heep.sax.de> <863ek1xtsl.fsf@bitbox.follo.net> <199712141816.TAA29536@uriah.heep.sax.de> From: Eivind Eklund Date: 14 Dec 1997 20:22:48 +0100 In-Reply-To: j@uriah.heep.sax.de's message of Sun, 14 Dec 1997 19:16:08 +0100 (MET) Message-ID: <86zpm3pw53.fsf@bitbox.follo.net> Lines: 38 X-Mailer: Gnus v5.4.52/XEmacs 20.2 Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk j@uriah.heep.sax.de (J Wunsch) writes: > Eivind Eklund wrote: > > > As far as I can see, the only correct #ifdef's in the kernel .c files > > are #ifdef KERNEL (should be _KERNEL) - everything else should be > > #if to allow #define XXX 1 or 0. Am I correct? Should I fix this as > > I do my walkthrough anyway? > > Hmm, not sure. All the boolean current options are #ifdef-evaluated. > > What do others think about it? I don't see an urgent need to change > _this_. I didn't notice all of those options had an 'N' prefixed :-( NPPP_DEFLATE still seems somehow bogus. Fixing the non-header file versions would then just be adding the proper opt_xxx.h includes - should be trivial, except I'm not certain what kernel code is being re-vamped at any moment. > Well, if you were going to spell _KERNEL correctly, by all means, go > ahead! ;) Won't this break many patches people are keeping externally? > I'm not sure what others think about kernel structs that vary their > size based on different kernel option usage. IMHO they should die, > since they are highly dangerous, and this danger doesn't justify the > few saved bytes. I dislike them, at least. I also dislike using structs to communicate kernel <-> userland - e.g. for ipfw. I'd like this to use something like the tags system on the Amiga. Eivind.