Date: 10 Dec 1997 13:32:42 +0100 From: Eivind Eklund <perhaps@yes.no> To: freebsd-hackers@FreeBSD.ORG Subject: Re: New option model (was Re: cvs commit: src/sys/kern kern_exit.c) Message-ID: <863ek1xtsl.fsf@bitbox.follo.net> In-Reply-To: j@uriah.heep.sax.de's message of Wed, 10 Dec 1997 01:13:24 %2B0100 (MET) References: <199712071816.KAA21840@freefall.freebsd.org> <19971208091729.40125@uriah.heep.sax.de> <863ek4p1tx.fsf_-_@bitbox.follo.net> <199712100013.BAA04827@uriah.heep.sax.de>
next in thread | previous in thread | raw e-mail | index | archive | help
J Wunsch <j@uriah.heep.sax.de> writes: [on converting to the opt_xxx.h option model] > > Are there anything more that should be done here than the following > > two steps? > > > > (1) weeding LINT against /sys/conf/options and > > /sys/i386/conf/options.i386 to find what options are not currently > > handled. > > Hmm, as your example proves, LINT contains a lot of garbage. :) > > The most problematic thing about this are those options that you can > currently still find as -DFOO -DBAR if you compile GENERIC (INET, > FFS). You have to walk throughout the entire code, and fix wrong > #ifdefs. I've got a side project for when I'm bored and feel slightly brain-dead (intiative-less) - making the kernel go through -Wall and flexelint. This means I'm already going trough large parts of the kernel. Should I add ifdef-conversion to my list of things to do? 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? For any option that isn't mentioned in a header file, it should be fairly simple to move to the new model - a bit of work, but mostly just work, not thought. > Except for a few things like #ifdef _KERNEL (still > misspelled as #ifdef KERNEL in FreeBSD), #ifdef's should be mostly > banned from .h files. These look like a lot of non-trivial work to fix :-( Eivind.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?863ek1xtsl.fsf>