From 6f1a631cbcfa79a709162d1b978e310e7a963349 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Sun, 10 Mar 2013 13:40:29 +0000 Subject: 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@ --- sys/dev/wscons/wsdisplay.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys') 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; } -- cgit v1.2.3