Date: Tue, 5 Nov 2002 13:08:34 -0800 (PST) From: Dave McCammon <davemac11@yahoo.com> To: zopewiz@yahoo.com Cc: freebsd-questions@freebsd.org Subject: Re: Junior hacker assignment :o Message-ID: <20021105210834.88642.qmail@web14807.mail.yahoo.com> In-Reply-To: <200211052030.gA5KUo1J037498@axp.csl.sri.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--- Mike Hogsett <hogsett@csl.sri.com> wrote: > > > Look in /usr/src/sys/kern/kern_shutdown.c > > static void > shutdown_halt(void *junk, int howto) { > ... > } > > Looks interesting. > > - Mike > > > Hi, > > > > --- Mike Hogsett <hogsett@csl.sri.com> wrote: > > > Well whatever function the kernel is in while it > > > loops, polling the > > > keyboard asking "press any key to reboot" could > have > > > additional logic for > > > a countdown timer to reboot. > > > > Great! > > > > > How and where to do this? I don't know. > > > > Not so great ;) > > > > Thanks a lot, > > Carlos. Not a real programmer but.... I wonder if adding the following (taken from shutdown_reset lines in kern_shutdown.c) DELAY(1000000); cpu_reset(); to the following in the cpu_halt(); area would work. You would have to modify the delay time. /* * If the shutdown was a clean halt, behave accordingly. */ static void shutdown_halt(void *junk, int howto) { if (howto & RB_HALT) { printf("\n"); printf("The operating system has halted.\n"); printf("Please press any key to reboot.\n\n"); switch (cngetc()) { case -1: /* No console, just die */ cpu_halt(); /* NOTREACHED */ default: howto &= ~RB_HALT; break; } } } __________________________________________________ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021105210834.88642.qmail>