aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/syscons/syscons.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/syscons/syscons.c')
-rw-r--r--sys/dev/syscons/syscons.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c
index 2020436d89bf..c5eed2309c9f 100644
--- a/sys/dev/syscons/syscons.c
+++ b/sys/dev/syscons/syscons.c
@@ -3858,22 +3858,28 @@ next_code:
case RBT:
#ifndef SC_DISABLE_REBOOT
- if (enable_reboot && !(flags & SCGETC_CN))
+ if (enable_reboot && !(flags & SCGETC_CN)) {
+ mtx_unlock(&Giant);
shutdown_nice(0);
+ }
#endif
break;
case HALT:
#ifndef SC_DISABLE_REBOOT
- if (enable_reboot && !(flags & SCGETC_CN))
+ if (enable_reboot && !(flags & SCGETC_CN)) {
+ mtx_unlock(&Giant);
shutdown_nice(RB_HALT);
+ }
#endif
break;
case PDWN:
#ifndef SC_DISABLE_REBOOT
- if (enable_reboot && !(flags & SCGETC_CN))
+ if (enable_reboot && !(flags & SCGETC_CN)) {
+ mtx_unlock(&Giant);
shutdown_nice(RB_HALT|RB_POWEROFF);
+ }
#endif
break;