Date: Mon, 31 Dec 2001 19:51:41 +1100 From: Peter Jeremy <peter.jeremy@alcatel.com.au> To: Peter Wemm <peter@wemm.org> Cc: Dag-Erling Smorgrav <des@ofug.org>, Alfred Perlstein <bright@mu.org>, cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/sys/kern vfs_subr.c Message-ID: <20011231195140.A24735@gsmx07.alcatel.com.au> In-Reply-To: <20011229000102.E137D38CC@overcee.netplex.com.au>; from peter@wemm.org on Fri, Dec 28, 2001 at 04:01:02PM -0800 References: <xzpy9jnm3ok.fsf@flood.ping.uio.no> <20011229000102.E137D38CC@overcee.netplex.com.au>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Dec 28, 2001 at 04:01:02PM -0800, Peter Wemm wrote: >Dag-Erling Smorgrav wrote: >> Alfred Perlstein <bright@mu.org> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011231195140.A24735>