Page MenuHomeFreeBSD

D32085.diff
No OneTemporary

D32085.diff

diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc
--- a/ObsoleteFiles.inc
+++ b/ObsoleteFiles.inc
@@ -40,6 +40,9 @@
# xargs -n1 | sort | uniq -d;
# done
+# 20210923: rename boot(9) to kern_reboot(9)
+OLD_FILES+=usr/share/man/man9/boot.9.gz
+
# 20210921: remove cloudabi
OLD_FILES+=usr/share/man/man4/cloudabi.4.gz
diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile
--- a/share/man/man9/Makefile
+++ b/share/man/man9/Makefile
@@ -15,7 +15,6 @@
bhnd_erom.9 \
bios.9 \
bitset.9 \
- boot.9 \
bpf.9 \
buf.9 \
buf_ring.9 \
@@ -195,6 +194,7 @@
ithread.9 \
kasan.9 \
KASSERT.9 \
+ kern_reboot.9 \
kern_testfrwk.9 \
kernacc.9 \
kernel_mount.9 \
diff --git a/share/man/man9/boot.9 b/share/man/man9/kern_reboot.9
rename from share/man/man9/boot.9
rename to share/man/man9/kern_reboot.9
--- a/share/man/man9/boot.9
+++ b/share/man/man9/kern_reboot.9
@@ -34,21 +34,25 @@
.\"
.\" $FreeBSD$
.\"
-.Dd February 14, 1997
-.Dt BOOT 9
+.Dd Sept 23, 2021
+.Dt KERN_REBOOT 9
.Os
.Sh NAME
-.Nm boot
+.Nm kern_reboot
.Nd halt or reboot the system
.Sh SYNOPSIS
.In sys/types.h
.In sys/systm.h
.In sys/reboot.h
.Ft void
-.Fn boot "int howto"
+.Fn kern_reboot "int howto"
+.In sys/eventhandler.h
+.Fn EVENTHANDLER_REGISTER "shutdown_pre_sync" "shutdown_fn" "private" "priority"
+.Fn EVENTHANDLER_REGISTER "shutdown_post_sync" "shutdown_fn" "private" "priority"
+.Fn EVENTHANDLER_REGISTER "shutdown_final" "shutdown_fn" "private" "priority"
.Sh DESCRIPTION
The
-.Fn boot
+.Fn kern_reboot
function handles final system shutdown, and either halts or reboots
the system.
The exact action to be taken is determined by the flags passed in
@@ -56,12 +60,12 @@
and by whether or not the system has finished autoconfiguration.
.Pp
If the system has finished autoconfiguration,
-.Fn boot
+.Fn kern_reboot
does the following:
.Bl -enum -offset indent
.It
If this is the first invocation of
-.Fn boot
+.Fn kern_reboot
and the
.Dv RB_NOSYNC
flag is not set in
@@ -93,8 +97,14 @@
.El
.Pp
If the system has not finished autoconfiguration,
-.Fn boot
+.Fn kern_reboot
runs any shutdown hooks previously registered,
prints a message, and halts the system.
+.Sh RETURN VALUES
+The
+.Fn kern_reboot
+function does not return.
.Sh SEE ALSO
+.Xr reboot 2
+.Xr EVENTHANDLER 9
.Xr vfs_unmountall 9
diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c
--- a/sys/kern/kern_shutdown.c
+++ b/sys/kern/kern_shutdown.c
@@ -421,7 +421,8 @@
}
/*
- * Shutdown the system cleanly to prepare for reboot, halt, or power off.
+ * kern_reboot(9): Shut down the system cleanly to prepare for reboot, halt, or
+ * power off.
*/
void
kern_reboot(int howto)
@@ -450,7 +451,7 @@
sched_bind(curthread, CPU_FIRST());
thread_unlock(curthread);
KASSERT(PCPU_GET(cpuid) == CPU_FIRST(),
- ("boot: not running on cpu 0"));
+ ("%s: not running on cpu 0", __func__));
}
#endif
/* We're in the process of rebooting. */

File Metadata

Mime Type
text/plain
Expires
Thu, Mar 6, 5:11 PM (8 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17017274
Default Alt Text
D32085.diff (2 KB)

Event Timeline