Date: Thu, 25 Mar 1999 12:42:31 +0100 From: Eivind Eklund <eivind@FreeBSD.org> To: Luigi Rizzo <luigi@labinfo.iet.unipi.it> Cc: cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org Subject: Options handling (was Re: cvs commit: src/sys/netinet ip_dummynet.c) Message-ID: <19990325124231.C57330@bitbox.follo.net> In-Reply-To: <199903250828.JAA12488@labinfo.iet.unipi.it>; from Luigi Rizzo on Thu, Mar 25, 1999 at 09:28:22AM %2B0100 References: <19990325111540.B57330@bitbox.follo.net> <199903250828.JAA12488@labinfo.iet.unipi.it>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Mar 25, 1999 at 09:28:22AM +0100, Luigi Rizzo wrote: > in this case the problem was the following: on 2.2.x i wrote the code, > did not register the option in /sys/conf/options, and as a result i had > -DBRIDGE automagically included when compiling every file. When porting > things to 3.x/4.x unregistered options were not allowed anymore (i > think, in any case this is a good thing) and so somehow i missed a few > includes. Because nobody used this code until recently, this was > undetected. With dummynet, i think i would have got instant feedback :) I handle options registration like this: 1. Compile up LINT with your option put in opt_global.h 2. Store all the object files from your compile 3. Move your option to the correct option file 4. Recompile LINT 5. Run 'diff' on the object files to find files that should have your include them. This technique worked out OK when converting all the old style options in LINT; the only problem was that there is a bunch of kernel files that are used at other places in the file tree (tsk, tsk, tsk), and that adding option includes can sometimes break buildworld. (Of course, you always need to remember to test the KLDs - they'll break often.) Thankfully, everybody was patient with me during the process. Eivind. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990325124231.C57330>