diff options
author | Ed Maste <emaste@FreeBSD.org> | 2014-06-27 17:50:33 +0000 |
---|---|---|
committer | Ed Maste <emaste@FreeBSD.org> | 2014-06-27 17:50:33 +0000 |
commit | 59644098f881cef909c1b7181db3268cd0cac69f (patch) | |
tree | 8d5bf911ab86505463544aa8651ae81db12bcb06 /sys/dev/vt/vt_core.c | |
parent | 874a6e051b35bf28a3cd1603cc47f52a01738e4d (diff) | |
download | src-59644098f881cef909c1b7181db3268cd0cac69f.tar.gz src-59644098f881cef909c1b7181db3268cd0cac69f.zip |
Use a common tunable to choose between vt(4)/sc(4)
With this change and previous work from ray@ it will be possible to put
both in GENERIC, and have one enabled by default, but allow the other to
be selected via the loader.
(The previous implementation had separate kern.vt.disable and
hw.syscons.disable tunables, and would panic if both drivers were
compiled in and neither was explicitly disabled.)
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Notes
Notes:
svn path=/head/; revision=267965
Diffstat (limited to 'sys/dev/vt/vt_core.c')
-rw-r--r-- | sys/dev/vt/vt_core.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/vt/vt_core.c b/sys/dev/vt/vt_core.c index e0bde1f47d0c..21d530ac42c5 100644 --- a/sys/dev/vt/vt_core.c +++ b/sys/dev/vt/vt_core.c @@ -215,7 +215,7 @@ static void vt_update_static(void *dummy) { - if (getenv("kern.vt.disable")) + if (!vty_enabled(VTY_VT)) return; if (main_vd->vd_driver != NULL) printf("VT: running with driver \"%s\".\n", @@ -959,7 +959,7 @@ vtterm_cnprobe(struct terminal *tm, struct consdev *cp) struct vt_device *vd = vw->vw_device; struct winsize wsz; - if (getenv("kern.vt.disable")) + if (!vty_enabled(VTY_VT)) return; if (vd->vd_flags & VDF_INITIALIZED) @@ -1996,7 +1996,7 @@ vt_upgrade(struct vt_device *vd) struct vt_window *vw; unsigned int i; - if (getenv("kern.vt.disable")) + if (!vty_enabled(VTY_VT)) return; for (i = 0; i < VT_MAXWINDOWS; i++) { @@ -2064,7 +2064,7 @@ vt_allocate(struct vt_driver *drv, void *softc) struct vt_device *vd; struct winsize wsz; - if (getenv("kern.vt.disable")) + if (!vty_enabled(VTY_VT)) return; if (main_vd->vd_driver == NULL) { |