diff options
Diffstat (limited to 'sys/kern/kern_shutdown.c')
-rw-r--r-- | sys/kern/kern_shutdown.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c index cf8081f..258699e 100644 --- a/sys/kern/kern_shutdown.c +++ b/sys/kern/kern_shutdown.c @@ -150,9 +150,13 @@ reboot(p, uap) /* * Called by events that want to shut down.. e.g <CTL><ALT><DEL> on a PC */ +static int shutdown_howto = 0; + void -shutdown_nice() +shutdown_nice(int howto) { + shutdown_howto = howto; + /* Send a signal to init(8) and have it shutdown the world */ if (initproc != NULL) { psignal(initproc, SIGINT); @@ -202,6 +206,9 @@ boot(howto) int howto; { + /* collect extra flags that shutdown_nice might have set */ + howto |= shutdown_howto; + #ifdef SMP if (smp_active) { printf("boot() called on cpu#%d\n", cpuid); |