Change the default poweroff delay from 0 to 5 seconds. This seems to be

adequate for the IDE disks that I have available for testing.  Most seem
to wait between 1 and 3 seconds before flushing their caches.

Add the ability to override the delay at compile time via the
undocumented option POWEROFF_DELAY.  The delay can still be set via
sysctl as it was originally implemented.
This commit is contained in:
Mike Smith 1999-12-07 04:35:37 +00:00
parent 025ff8abcc
commit 9eec696993
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=54248

View file

@ -556,7 +556,11 @@ panic(const char *fmt, ...)
/*
* Support for poweroff delay.
*/
static int poweroff_delay = 0;
#ifndef POWEROFF_DELAY
# define POWEROFF_DELAY 5000
#endif
static int poweroff_delay = POWEROFF_DELAY;
SYSCTL_INT(_kern_shutdown, OID_AUTO, poweroff_delay, CTLFLAG_RW,
&poweroff_delay, 0, "");