diff options
-rw-r--r-- | sys/dev/syscons/syscons.c | 2 | ||||
-rw-r--r-- | sys/i386/isa/pcvt/pcvt_kbd.c | 2 | ||||
-rw-r--r-- | sys/kern/kern_shutdown.c | 9 | ||||
-rw-r--r-- | sys/sys/systm.h | 2 |
4 files changed, 11 insertions, 4 deletions
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c index 2a447f7..49b8f6c 100644 --- a/sys/dev/syscons/syscons.c +++ b/sys/dev/syscons/syscons.c @@ -3098,7 +3098,7 @@ next_code: case RBT: #ifndef SC_DISABLE_REBOOT - shutdown_nice(); + shutdown_nice(0); #endif break; diff --git a/sys/i386/isa/pcvt/pcvt_kbd.c b/sys/i386/isa/pcvt/pcvt_kbd.c index 85296a1..f7f946d 100644 --- a/sys/i386/isa/pcvt/pcvt_kbd.c +++ b/sys/i386/isa/pcvt/pcvt_kbd.c @@ -938,7 +938,7 @@ scroll_reset: #if PCVT_CTRL_ALT_DEL /* Check for cntl-alt-del */ if((key == 76) && ctrl_down && (meta_down||altgr_down)) - shutdown_nice(); + shutdown_nice(0); #endif /* PCVT_CTRL_ALT_DEL */ #if defined(DDB) /* Check for cntl-alt-esc */ 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); diff --git a/sys/sys/systm.h b/sys/sys/systm.h index 3f900a8..0e8f9bb 100644 --- a/sys/sys/systm.h +++ b/sys/sys/systm.h @@ -184,7 +184,7 @@ void usrinfoinit __P((void)); void vntblinit __P((void)); /* Finalize the world. */ -void shutdown_nice __P((void)); +void shutdown_nice __P((int)); /* * Kernel to clock driver interface. |