From owner-freebsd-hackers Tue Dec 9 16:21:30 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id QAA21682 for hackers-outgoing; Tue, 9 Dec 1997 16:21:30 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from sax.sax.de (sax.sax.de [193.175.26.33]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id QAA21676 for ; Tue, 9 Dec 1997 16:21:20 -0800 (PST) (envelope-from j@uriah.heep.sax.de) Received: (from uucp@localhost) by sax.sax.de (8.8.8/8.8.8) with UUCP id BAA01809 for freebsd-hackers@freebsd.org; Wed, 10 Dec 1997 01:21:14 +0100 (CET) (envelope-from j@uriah.heep.sax.de) Received: (from j@localhost) by uriah.heep.sax.de (8.8.8/8.8.5) id BAA04827; Wed, 10 Dec 1997 01:13:24 +0100 (MET) Date: Wed, 10 Dec 1997 01:13:24 +0100 (MET) Message-Id: <199712100013.BAA04827@uriah.heep.sax.de> Mime-Version: 1.0 X-Newsreader: knews 0.9.8 Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) Organization: Private BSD site, Dresden X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E References: <199712071816.KAA21840@freefall.freebsd.org> <19971208091729.40125@uriah.heep.sax.de> <863ek4p1tx.fsf_-_@bitbox.follo.net> From: j@uriah.heep.sax.de (J Wunsch) Subject: Re: New option model (was Re: cvs commit: src/sys/kern kern_exit.c) X-Original-Newsgroups: local.freebsd.hackers To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Eivind Eklund wrote: > "New option model" refers to the opt_* header files, I guess? Yep, so Makefile dependencies will work. > 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. Except for a few things like #ifdef _KERNEL (still misspelled as #ifdef KERNEL in FreeBSD), #ifdef's should be mostly banned from .h files. j@uriah 469% fgrep -h #ifdef /sys/sys/*.h | fgrep -v KERNEL | sort -u #ifdef DKTYPENAMES #ifdef SIGPROP #ifdef _BSD_CLOCKID_T_ #ifdef _BSD_CLOCK_T_ #ifdef _BSD_SIZE_T_ #ifdef _BSD_SSIZE_T_ #ifdef _BSD_TIMER_T_ #ifdef _BSD_TIME_T_ #ifdef _NOT_AVAILABLE #ifdef _THREAD_SAFE #ifdef __GNUC__ #ifdef COMPAT_43 #ifdef COMPAT_SUNOS #ifdef DEBUG_VFS_LOCKS #ifdef DIAGNOSTIC #ifdef DISKSORT_STATS #ifdef DKTYPENAMES #ifdef GPROF4 #ifdef KLD_DEBUG #ifdef LFS #ifdef LOCKF_DEBUG #ifdef MALLOC_DECLARE #ifdef MALLOC_INSTANTIATE #ifdef MAXPARTITIONS /* XXX don't depend on disklabel.h */ #ifdef MOD_DEBUG #ifdef PC98 #ifdef PGINPROF #ifdef PPS_SYNC #ifdef PRCOREQUESTS #ifdef PRCREQUESTS #ifdef PRUREQUESTS #ifdef PSEUDO_LKM #ifdef SIMPLELOCK_DEBUG #ifdef SMP #ifdef SYSLOG_NAMES #ifdef TTYDEFCHARS #ifdef USE_OLD_TTY #ifdef VFS_LKM #ifdef _NEW_VFSCONF #ifdef _POSIX_SOURCE #ifdef __FreeBSD__ #ifdef __GNUC__ #ifdef __STDC__ #ifdef __i386__ #ifdef notdef #ifdef notyet Without looking further, i would assume that at least one third of the above is wrong. Wrong #ifdefs in headers break LKM options. > /sys/i386/conf/LINT: COMPAT_43 Another sucker, but probably easier to fix. > /sys/i386/conf/LINT: DEBUG Should not be an option, it's got too many different meanings. ;) > /sys/i386/conf/LINT: FDSEEKWAIT Ick, that's in my area. I think this turned into a non-option over time... > /sys/i386/conf/LINT: SUIDDIR Another one that has recently been added, where the developer didn't bother to do it right from the beginning... -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)