From owner-cvs-all Mon Dec 31 0:52: 2 2001 Delivered-To: cvs-all@freebsd.org Received: from netau1.alcanet.com.au (ntp.alcanet.com.au [203.62.196.27]) by hub.freebsd.org (Postfix) with ESMTP id 3A33E37B41B; Mon, 31 Dec 2001 00:51:54 -0800 (PST) Received: from mfg1.cim.alcatel.com.au (mfg1.cim.alcatel.com.au [139.188.23.1]) by netau1.alcanet.com.au (8.9.3 (PHNE_22672)/8.9.3) with ESMTP id TAA19889; Mon, 31 Dec 2001 19:51:44 +1100 (EDT) Received: from gsmx07.alcatel.com.au by cim.alcatel.com.au (PMDF V5.2-32 #37645) with ESMTP id <01KCJ385I8G04M3XOZ@cim.alcatel.com.au>; Mon, 31 Dec 2001 19:51:17 +1100 Received: (from jeremyp@localhost) by gsmx07.alcatel.com.au (8.11.6/8.11.6) id fBV8pfE24751; Mon, 31 Dec 2001 19:51:41 +1100 Content-return: prohibited Date: Mon, 31 Dec 2001 19:51:41 +1100 From: Peter Jeremy Subject: Re: cvs commit: src/sys/kern vfs_subr.c In-reply-to: <20011229000102.E137D38CC@overcee.netplex.com.au>; from peter@wemm.org on Fri, Dec 28, 2001 at 04:01:02PM -0800 To: Peter Wemm Cc: Dag-Erling Smorgrav , Alfred Perlstein , cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Mail-Followup-To: Peter Wemm , Dag-Erling Smorgrav , Alfred Perlstein , cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Message-id: <20011231195140.A24735@gsmx07.alcatel.com.au> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-disposition: inline User-Agent: Mutt/1.2.5i References: <20011229000102.E137D38CC@overcee.netplex.com.au> Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, Dec 28, 2001 at 04:01:02PM -0800, Peter Wemm wrote: >Dag-Erling Smorgrav wrote: >> Alfred Perlstein writes: >> > find sys -type f -name "*.c" | >> > while read i ; do >> > sed 's/\(^[a-z].*\).*=.*0;/\1;/' < $i > $i.new >> > mv $i.new $i >> > done >> > cvs commit -m "Peter made me do it" >> >> perl -p -i -e 'while (s/^(\w.*)=\s+0([,;].*)$/$1$2/) { }' \ >> $(find sys -type f -name "*.c") >> cvs commit -m "Peter made me do it" >> >> (your version will break variables that are initialized to e.g. 10) > >I seem to recall that some early-boot stuff may depend on certain variables >being zeroed explicitly since they were being accessed before locore zeroed >its bss section when booting from boot2 (rather than loader). These may >have been confined within the assembler .s files though. > >Anyway, if somebody is going to do this, be careful not to go too close to >locore/machdep/early startup code without carefully checking the >implications. I'd also point out that some of those initialisations are deliberate to allow the value to be patched. Checking the grep output for "patch" gives the following. Examining the context is likely to reveal more. dev/si/si.c:static int si_debug = 0; /* data, not bss, so it's patchable */ i4b/driver/i4b_bsdi_ibc.c:int ibcdebug = 0; /* Use bpatch to set this for debug printf's */ kern/init_main.c:int boothowto = 0; /* initialized so that it can be patched */ Peter To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message