From owner-freebsd-hackers Tue Aug 13 15:30:46 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id PAA17263 for hackers-outgoing; Tue, 13 Aug 1996 15:30:46 -0700 (PDT) Received: from whistle.com (s205m131.whistle.com [207.76.205.131]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id PAA17258 for ; Tue, 13 Aug 1996 15:30:43 -0700 (PDT) Received: (from smap@localhost) by whistle.com (8.7.5/8.6.12) id PAA10449; Tue, 13 Aug 1996 15:28:20 -0700 (PDT) Received: from current1.whistle.com(207.76.205.22) by whistle.com via smap (V1.3) id sma010447; Tue Aug 13 15:28:13 1996 Message-ID: <3211014E.2781E494@whistle.com> Date: Tue, 13 Aug 1996 15:27:26 -0700 From: Julian Elischer Organization: Whistle Communications X-Mailer: Mozilla 3.0b4 (X11; I; FreeBSD 2.2-CURRENT i386) MIME-Version: 1.0 To: Terry Lambert CC: hackers@freebsd.org Subject: Re: Rebooting and related topics.. References: <199608132149.OAA27819@phaeton.artisoft.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Terry Lambert wrote: > > > I've added a small callout list to the reboot code so that we and > > other third party types can add modules which require actions at > > shutdown. looking at the boot code however, I see that about 90% > > of boot() in machdep.c is in fact NOT mach dependent at all. > > I'd like to move most of this out to somewhere more generic > > while I'm adding my callout code.. > > > > several questions.. > > > > 1/ am I correct? > > I think so. > > > 2/ can anyone suggest the correct place for it? > > kern_sync.c? > kern_shutdown.c? (new) I'm tempted to crete the new file and possibly move reboot() in there as well. > Think about priority based insertion and maintaining a front/end/middle > (middle = don't care) insertion order. you know, I don't think this is that important.. it complicates things.. I migh tadd 2 calls. at_reboot() and at_reboot_last() but that would be the limit of it I think.. KISS > > That way the actual attempts at keyboard reset, etc., can be put into > the same list as call-outs. why reset a keyboard at reboot? > > You may also want to add a parameter to the calldowns that supports > the type of shutdown (halt/reboot/boot_to_dos, etc.). I already do,, the args to the function are func(arg1,howto) where howto is the usual RB_ flags word.. julian