Module Name: src Committed By: macallan Date: Wed Dec 28 18:37:58 UTC 2011
Modified Files: src/sys/dev/wsfb: genfb.c Log Message: if the cursor row passed in a device property doesn't fit on the screen just ignore it and clear the screen To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/sys/dev/wsfb/genfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/wsfb/genfb.c diff -u src/sys/dev/wsfb/genfb.c:1.43 src/sys/dev/wsfb/genfb.c:1.44 --- src/sys/dev/wsfb/genfb.c:1.43 Thu Dec 22 04:53:43 2011 +++ src/sys/dev/wsfb/genfb.c Wed Dec 28 18:37:58 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: genfb.c,v 1.43 2011/12/22 04:53:43 macallan Exp $ */ +/* $NetBSD: genfb.c,v 1.44 2011/12/28 18:37:58 macallan Exp $ */ /*- * Copyright (c) 2007 Michael Lorenz @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: genfb.c,v 1.43 2011/12/22 04:53:43 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: genfb.c,v 1.44 2011/12/28 18:37:58 macallan Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -267,6 +267,11 @@ genfb_attach(struct genfb_softc *sc, str sc->sc_defaultscreen_descr.nrows = ri->ri_rows; sc->sc_defaultscreen_descr.ncols = ri->ri_cols; + if (crow >= ri->ri_rows) { + crow = 0; + sc->sc_want_clear = 1; + } + if (console) wsdisplay_cnattach(&sc->sc_defaultscreen_descr, ri, 0, crow, defattr);