diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2013-03-10 13:40:29 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2013-03-10 13:40:29 +0000 |
commit | 6f1a631cbcfa79a709162d1b978e310e7a963349 (patch) | |
tree | ec847aa56d9a94cab3bbc49b6134bb48d02f8c83 /sys/dev | |
parent | 6fb4a6765be63ff609da9b3b4d0e7c89654d00bf (diff) |
Make it possible to call wsdisplay_cnattach() to override an already attached
wsdisplay console later in the boot process. Needed for upcoming KMS changes
where on i386/amd64 we will switch from vga text mode to a framebuffer console
when the KMS drm driver attaches.
ok miod@, mpi@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/wscons/wsdisplay.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/wscons/wsdisplay.c b/sys/dev/wscons/wsdisplay.c index ea45c1e3cd3..a57b2bc997f 100644 --- a/sys/dev/wscons/wsdisplay.c +++ b/sys/dev/wscons/wsdisplay.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wsdisplay.c,v 1.106 2012/07/13 12:37:08 deraadt Exp $ */ +/* $OpenBSD: wsdisplay.c,v 1.107 2013/03/10 13:40:28 kettenis Exp $ */ /* $NetBSD: wsdisplay.c,v 1.82 2005/02/27 00:27:52 perry Exp $ */ /* @@ -783,7 +783,6 @@ wsdisplay_cnattach(const struct wsscreen_descr *type, void *cookie, int ccol, const struct wsemul_ops *wsemul; const struct wsdisplay_emulops *emulops; - KASSERT(!wsdisplay_console_initted); KASSERT(type->nrows > 0); KASSERT(type->ncols > 0); KASSERT(crow < type->nrows); @@ -808,7 +807,8 @@ wsdisplay_cnattach(const struct wsscreen_descr *type, void *cookie, int ccol, wsdisplay_console_conf.wsemulcookie = (*wsemul->cnattach)(type, cookie, ccol, crow, defattr); - cn_tab = &wsdisplay_cons; + if (!wsdisplay_console_initted) + cn_tab = &wsdisplay_cons; wsdisplay_console_initted = 1; } |