Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F115623189
D34820.id105743.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D34820.id105743.diff
View Options
diff --git a/sys/dev/vt/vt.h b/sys/dev/vt/vt.h
--- a/sys/dev/vt/vt.h
+++ b/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)
diff --git a/sys/dev/vt/vt_core.c b/sys/dev/vt/vt_core.c
--- a/sys/dev/vt/vt_core.c
+++ b/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
diff --git a/sys/dev/vt/vt_cpulogos.c b/sys/dev/vt/vt_cpulogos.c
--- a/sys/dev/vt/vt_cpulogos.c
+++ b/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)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Apr 27, 3:56 AM (16 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17812106
Default Alt Text
D34820.id105743.diff (2 KB)
Attached To
Mode
D34820: vt: use TERMINAL_DECLARE_EARLY() macro
Attached
Detach File
Event Timeline
Log In to Comment