diff options
author | 2013-03-10 13:40:28 +0000 | |
---|---|---|
committer | 2013-03-10 13:40:28 +0000 | |
commit | 4364a0a7a7100f56300204ab3e956b95dd593f58 (patch) | |
tree | 2875f546cf813c243213fb6b3287b943f4836f35 | |
parent | Switch to ANSI C prototypes. Diff by somebody else which I no longer remember. (diff) | |
download | wireguard-openbsd-4364a0a7a7100f56300204ab3e956b95dd593f58.tar.xz wireguard-openbsd-4364a0a7a7100f56300204ab3e956b95dd593f58.zip |
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@
-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; } |