aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/vt/vt_core.c
diff options
context:
space:
mode:
authorQuentin Thébault <quentin.thebault@defenso.fr>2026-04-02 16:38:47 +0000
committerAhmad Khalifa <vexeduxr@FreeBSD.org>2026-04-03 07:15:29 +0000
commit4b862c713ac5556ab4bd1828b47c5eb9cb28e067 (patch)
tree363338ba98f5a4e85df2c504856f510a041df869 /sys/dev/vt/vt_core.c
parentb3d6829f4998ad8ac8c65d39ac9513ba85a9974b (diff)
Diffstat (limited to 'sys/dev/vt/vt_core.c')
-rw-r--r--sys/dev/vt/vt_core.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/sys/dev/vt/vt_core.c b/sys/dev/vt/vt_core.c
index b9159a73ad79..0ca4bb8d4d49 100644
--- a/sys/dev/vt/vt_core.c
+++ b/sys/dev/vt/vt_core.c
@@ -1684,8 +1684,13 @@ vtterm_splash(struct vt_device *vd)
uintptr_t image;
vt_axis_t top, left;
- si = MD_FETCH(preload_kmdp, MODINFOMD_SPLASH, struct splash_info *);
if (!(vd->vd_flags & VDF_TEXTMODE) && (boothowto & RB_MUTE)) {
+ if (rebooting == 1) {
+ si = MD_FETCH(preload_kmdp, MODINFOMD_SHTDWNSPLASH, struct splash_info *);
+ vd->vd_driver->vd_blank(vd, TC_BLACK);
+ } else {
+ si = MD_FETCH(preload_kmdp, MODINFOMD_SPLASH, struct splash_info *);
+ }
if (si == NULL) {
top = (vd->vd_height - vt_logo_height) / 2;
left = (vd->vd_width - vt_logo_width) / 2;
@@ -1832,6 +1837,15 @@ vt_init_font_static(void)
vt_font_assigned = font;
}
+#ifdef DEV_SPLASH
+static int
+vt_shutdown_splash(struct vt_window *vw)
+{
+ vtterm_splash(vw->vw_device);
+ return (0);
+}
+#endif
+
static void
vtterm_cnprobe(struct terminal *tm, struct consdev *cp)
{
@@ -3177,6 +3191,10 @@ vt_upgrade(struct vt_device *vd)
/* For existing console window. */
EVENTHANDLER_REGISTER(shutdown_pre_sync,
vt_window_switch, vw, SHUTDOWN_PRI_DEFAULT);
+#ifdef DEV_SPLASH
+ EVENTHANDLER_REGISTER(shutdown_pre_sync,
+ vt_shutdown_splash, vw, SHUTDOWN_PRI_DEFAULT);
+#endif
}
}
}