From owner-cvs-all Thu Mar 25 3:43: 4 1999 Delivered-To: cvs-all@freebsd.org Received: from ns1.yes.no (ns1.yes.no [195.204.136.10]) by hub.freebsd.org (Postfix) with ESMTP id E6CC214D7E; Thu, 25 Mar 1999 03:42:53 -0800 (PST) (envelope-from eivind@bitbox.follo.net) Received: from bitbox.follo.net (bitbox.follo.net [195.204.143.218]) by ns1.yes.no (8.9.1a/8.9.1) with ESMTP id MAA10177; Thu, 25 Mar 1999 12:42:32 +0100 (CET) Received: (from eivind@localhost) by bitbox.follo.net (8.8.8/8.8.6) id MAA57947; Thu, 25 Mar 1999 12:42:31 +0100 (MET) Date: Thu, 25 Mar 1999 12:42:31 +0100 From: Eivind Eklund To: Luigi Rizzo 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> References: <19990325111540.B57330@bitbox.follo.net> <199903250828.JAA12488@labinfo.iet.unipi.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.1i In-Reply-To: <199903250828.JAA12488@labinfo.iet.unipi.it>; from Luigi Rizzo on Thu, Mar 25, 1999 at 09:28:22AM +0100 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk 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