Date: Wed, 10 Dec 1997 01:13:24 +0100 (MET) From: j@uriah.heep.sax.de (J Wunsch) To: freebsd-hackers@freebsd.org Subject: Re: New option model (was Re: cvs commit: src/sys/kern kern_exit.c) Message-ID: <199712100013.BAA04827@uriah.heep.sax.de> References: <199712071816.KAA21840@freefall.freebsd.org> <19971208091729.40125@uriah.heep.sax.de> <863ek4p1tx.fsf_-_@bitbox.follo.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Eivind Eklund <perhaps@yes.no> 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. ;-)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199712100013.BAA04827>