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:
parent
025ff8abcc
commit
9eec696993
@ -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, "");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user