FreeBSD/sys/kern/kern_shutdown.c
/*
 * Check to see if the system paniced, pause and then reboot
 * according to the specified delay.
 */
Check to see if the system paniced, pause and then reboot
according to the specified delay.
Check to see if the system paniced pause and then reboot according to the specified delay .
static void
shutdown_panic(void *junk, int howto)
{
	int loop;
	if (howto & RB_DUMP) {
		if (panic_reboot_wait_time != 0) {
			if (panic_reboot_wait_time != -1) {
				printf("Automatic reboot in %d seconds - "
				       "press a key on the console to abort\n",
					panic_reboot_wait_time);
				for (loop = panic_reboot_wait_time * 10;
				     loop > 0; --loop) {
					DELAY(1000 * 100); 
					if (cncheckc() != -1)
						break;
				}
				if (!loop)
					return;
			}
		} else { 
			return;
		}
		printf("--> Press a key on the console to reboot,\n");
		printf("--> or switch off the system now.\n");
		cngetc();
	}
}
static void shutdown_panic ( void * junk , int howto ) { int loop ; if ( howto & RB_DUMP ) { if ( panic_reboot_wait_time != 0 ) { if ( panic_reboot_wait_time != -1 ) { printf ( " " " \n " , panic_reboot_wait_time ) ; for ( loop = panic_reboot_wait_time * 10 ; loop > 0 ; -- loop ) { DELAY ( 1000 * 100 ) ; if ( cncheckc ( ) != -1 ) break ; } if ( ! loop ) return ; } } else { return ; } printf ( " \n " ) ; printf ( " \n " ) ; cngetc ( ) ; } }
Check to see if the system paniced, pause and then reboot
 according to the specified delay.
Check to see if the system paniced pause and then reboot according to the specified delay .
/* 1/10th second */ /* Did user type a key? */ /* zero time specified - reboot NOW */