Index: sys/dev/vt/vt.h =================================================================== --- sys/dev/vt/vt.h +++ sys/dev/vt/vt.h @@ -386,8 +386,6 @@ */ extern struct vt_device vt_consdev; -extern struct terminal vt_consterm; -extern const struct terminal_class vt_termclass; void vt_upgrade(struct vt_device *vd); #define PIXEL_WIDTH(w) ((w) / 8) Index: sys/dev/vt/vt_core.c =================================================================== --- sys/dev/vt/vt_core.c +++ sys/dev/vt/vt_core.c @@ -87,7 +87,7 @@ static tc_ioctl_t vtterm_ioctl; static tc_mmap_t vtterm_mmap; -const struct terminal_class vt_termclass = { +static const struct terminal_class vt_termclass = { .tc_bell = vtterm_bell, .tc_cursor = vtterm_cursor, .tc_putchar = vtterm_putchar, @@ -202,7 +202,7 @@ #define _VTDEFH MAX(100, PIXEL_HEIGHT(VT_FB_MAX_HEIGHT)) #define _VTDEFW MAX(200, PIXEL_WIDTH(VT_FB_MAX_WIDTH)) -struct terminal vt_consterm; +static struct terminal vt_consterm; static struct vt_window vt_conswindow; #ifndef SC_NO_CONSDRAWN static term_char_t vt_consdrawn[PIXEL_HEIGHT(VT_FB_MAX_HEIGHT) * PIXEL_WIDTH(VT_FB_MAX_WIDTH)]; @@ -262,19 +262,9 @@ .vw_bell_pitch = VT_BELLPITCH, .vw_bell_duration = VT_BELLDURATION, }; -struct terminal vt_consterm = { - .tm_class = &vt_termclass, - .tm_softc = &vt_conswindow, - .tm_flags = TF_CONS, -}; -static struct consdev vt_consterm_consdev = { - .cn_ops = &termcn_cnops, - .cn_arg = &vt_consterm, - .cn_name = "ttyv0", -}; /* Add to set of consoles. */ -DATA_SET(cons_set, vt_consterm_consdev); +TERMINAL_DECLARE_EARLY(vt_consterm, vt_termclass, &vt_conswindow); /* * Right after kmem is done to allow early drivers to use locking and allocate Index: sys/dev/vt/vt_cpulogos.c =================================================================== --- sys/dev/vt/vt_cpulogos.c +++ sys/dev/vt/vt_cpulogos.c @@ -221,12 +221,14 @@ if (!vt_splash_cpu) return; - tm = &vt_consterm; - vw = tm->tm_softc; + vd = &vt_consdev; + if (vd == NULL) + return; + vw = vd->vd_curwindow; if (vw == NULL) return; - vd = vw->vw_device; - if (vd == NULL) + tm = vw->vw_terminal; + if (tm == NULL) return; vf = vw->vw_font; if (vf == NULL)