Only set up the console screen on the console ffb.

Fixes bug where ttyE0 ends up on the 2nd ffb.
Based on dev/sun/cgsix.c:r1.27 (from macallan@).
This commit is contained in:
jdc 2005-07-04 22:18:37 +00:00
parent 0b9ed39b26
commit 93bdac459d
1 changed files with 8 additions and 5 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ffb.c,v 1.18 2005/05/31 17:33:02 macallan Exp $ */
/* $NetBSD: ffb.c,v 1.19 2005/07/04 22:18:37 jdc Exp $ */
/* $OpenBSD: creator.c,v 1.20 2002/07/30 19:48:15 jason Exp $ */
/*
@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ffb.c,v 1.18 2005/05/31 17:33:02 macallan Exp $");
__KERNEL_RCSID(0, "$NetBSD: ffb.c,v 1.19 2005/07/04 22:18:37 jdc Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -201,9 +201,12 @@ ffb_attach(struct ffb_softc *sc)
wsfont_init();
ffb_init_screen(sc, &ffb_console_screen, 1, &defattr);
ffb_console_screen.active = 1;
sc->active = &ffb_console_screen;
/* we mess with ffb_console_screen only once */
if (sc->sc_console) {
ffb_init_screen(sc, &ffb_console_screen, 1, &defattr);
ffb_console_screen.active = 1;
sc->active = &ffb_console_screen;
}
ri = &ffb_console_screen.ri;
ffb_stdscreen.nrows = ri->ri_rows;