From owner-freebsd-hackers Wed Dec 10 04:46:49 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id EAA10476 for hackers-outgoing; Wed, 10 Dec 1997 04:46:49 -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 EAA10470 for ; Wed, 10 Dec 1997 04:46:43 -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 MAA15851 for ; Wed, 10 Dec 1997 12:33:13 GMT Received: (from eivind@localhost) by bitbox.follo.net (8.8.6/8.8.6) id NAA04522; Wed, 10 Dec 1997 13:32:44 +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> From: Eivind Eklund Date: 10 Dec 1997 13:32:42 +0100 In-Reply-To: j@uriah.heep.sax.de's message of Wed, 10 Dec 1997 01:13:24 +0100 (MET) Message-ID: <863ek1xtsl.fsf@bitbox.follo.net> Lines: 37 X-Mailer: Gnus v5.4.52/XEmacs 20.2 Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk J Wunsch 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.