summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_disk.c
diff options
context:
space:
mode:
authoruebayasi <uebayasi@openbsd.org>2014-07-11 14:36:44 +0000
committeruebayasi <uebayasi@openbsd.org>2014-07-11 14:36:44 +0000
commitfed31332d572142068f1121a8c2c931f196f0500 (patch)
treec2ad998d8c091a94497a8543111bbbcef2dbba5b /sys/kern/subr_disk.c
parentRemove redundant check and wrong fix: fat.c checks already take care (diff)
downloadwireguard-openbsd-fed31332d572142068f1121a8c2c931f196f0500.tar.xz
wireguard-openbsd-fed31332d572142068f1121a8c2c931f196f0500.zip
reboot(9): Add MI reboot entry function
Now, for kernel to "reboot" (reboot, halt, or shutdown), MD boot(9) is called in some places. This change introduces a new MI function reboot(9) which is simply a wrapper to call MD boot(9). OK kettenis@ deraadt@
Diffstat (limited to 'sys/kern/subr_disk.c')
-rw-r--r--sys/kern/subr_disk.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/subr_disk.c b/sys/kern/subr_disk.c
index 06d0723cb40..28d94942358 100644
--- a/sys/kern/subr_disk.c
+++ b/sys/kern/subr_disk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: subr_disk.c,v 1.164 2014/07/02 09:59:43 dlg Exp $ */
+/* $OpenBSD: subr_disk.c,v 1.165 2014/07/11 14:36:44 uebayasi Exp $ */
/* $NetBSD: subr_disk.c,v 1.17 1996/03/16 23:17:08 christos Exp $ */
/*
@@ -1163,7 +1163,7 @@ setroot(struct device *bootdv, int part, int exitflags)
cnpollc(FALSE);
splx(s);
if (strcmp(buf, "exit") == 0)
- boot(exitflags);
+ reboot(exitflags);
if (len == 0 && bootdv != NULL) {
strlcpy(buf, bootdv->dv_xname, sizeof buf);
len = strlen(buf);
@@ -1200,7 +1200,7 @@ setroot(struct device *bootdv, int part, int exitflags)
cnpollc(FALSE);
splx(s);
if (strcmp(buf, "exit") == 0)
- boot(exitflags);
+ reboot(exitflags);
if (len == 0 && rootdv != NULL) {
switch (rootdv->dv_class) {
case DV_IFNET: