aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/syscons
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2018-03-21 14:47:12 +0000
committerWarner Losh <imp@FreeBSD.org>2018-03-21 14:47:12 +0000
commit026fb270cace060b6509ed920659e5d1d9fd6d75 (patch)
treea60f8724c89f56d9641df789284edb1fe582e016 /sys/dev/syscons
parentb799e21b28e2c85c7db5e53b1ac0b38d4549bf8b (diff)
Notes
Diffstat (limited to 'sys/dev/syscons')
-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;